Improve permuted layout/view construction
artv3 opened this issue · 0 comments
artv3 commented
Is your feature request related to a problem? Please describe.
Constructing a permuted layout can be cumbersome. For example the following will create a permuted layout and identify unit stride.
std::array<RAJA::idx_t, 3> perm3a {{2, 1, 0}};
RAJA::Layout< 3, int> perm3a_layout =
RAJA::make_permuted_layout( {{Nx, Ny, Nz}}, perm3a);
RAJA::View< int, RAJA::Layout<3, int, 0> > perm3a_view_3D(a, perm3a_layout);
Experiments have shown that specifying unit stride on the Layout used when making a permuted layout object does not effect index calculation only the one in the View.
Describe the solution you'd like
A simpler approach to constructing such a view