-
Notifications
You must be signed in to change notification settings - Fork 103
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
Reshape method #1760
base: develop
Are you sure you want to change the base?
Reshape method #1760
Conversation
@MrBurmark , @rhornung67 I think the example for the reshape method can be simplified. I just pushed up a new version. I was a bit worried the previous version might have too much going on. |
include/RAJA/util/View.hpp
Outdated
} | ||
|
||
template<std::size_t...Is> | ||
struct Reshape<std::index_sequence<Is...>> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MrBurmark , this is the specialization that takes an index_sequence and identifies the correct unit stride
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, I see an example is documentation coming?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks for reminding me. I'll make something in the read the docs page within the next few days.
// Initialize memory using right most unit stride | ||
// | ||
//----------------------------------------------------------------------------// | ||
std::cout << "\n\nInitialize array with right most indexing...\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these implementations are much easier to understand if your intent is just to show the mechanics of View reshaping. 👍
I fixed a bug with the custom sequence, thanks @rhornung67 for point it out. This PR is now ready for review. |
Co-authored-by: Jason Burmark <[email protected]>
Summary
This PR adds helper methods to views to create Reshape methods with compile time options C and Fortran style indexing