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

Add Iterator to make the STL available to 1D Views #158

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

bernhardmgruber
Copy link
Member

No description provided.

vd(tag::Y{}) = ++i;
vd(tag::Z{}) = ++i;
}
std::copy(begin(aosView), end(aosView), begin(soaView));
Copy link
Member Author

Choose a reason for hiding this comment

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

Having this line work is super crazy! This means we can use std::copy to copy between ANY LLAMA layouts. This will always do an element-wise copy, which is sometimes suboptimal. But it correctly shuffles the layouts through the iterators and virtual datums.

@bernhardmgruber bernhardmgruber merged commit 8c25e97 into alpaka-group:develop Mar 3, 2021
@bernhardmgruber bernhardmgruber deleted the iterator branch March 3, 2021 16:22
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.

1 participant