Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rough implementation of scan algorithm. #1776

Draft
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

long58
Copy link
Contributor

@long58 long58 commented Dec 4, 2024

Summary

Adds sycl scan algorithm

@long58 long58 requested a review from rhornung67 December 4, 2024 17:07
{
// ::sycl::joint_inclusive_scan()
using std::distance;
std::copy(begin, end, out);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This copy should be parallel

Comment on lines +76 to +77
auto buffAccessor = buffPtr->get_access(cgh);
auto tempAccessor = tempPtr->get_access(cgh);
Copy link
Member

@MrBurmark MrBurmark Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with how sycl::buffer objects work, do they make a copy of the data?

{
::sycl::queue* sycl_queue = sycl_res.get_queue();

using valueT = typename std::remove_reference<decltype(*begin)>::type;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably best to use iterator_traits https://en.cppreference.com/w/cpp/iterator/iterator_traits

ii++;
} while ( ii <= iterations);

sycl_res.wait();
Copy link
Member

@MrBurmark MrBurmark Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this wait be conditional on Async from the policy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants