|
RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
|
#include <Hyperplane.hpp>
Additional Inherited Members | |
Public Types inherited from RAJA::internal::Statement< ExecPolicy, EnclosedStmts... > | |
| using | enclosed_statements_t = StatementList< EnclosedStmts... > |
| using | execution_policy_t = ExecPolicy |
Public Member Functions inherited from RAJA::internal::Statement< ExecPolicy, EnclosedStmts... > | |
| Statement ()=delete | |
A RAJA::kernel statement that performs hyperplane iteration over multiple indices.
Given segments S0, S1, ... and iterates i0, i1, ... that range from 0 to Ni, where Ni = length(Si), hyperplanes are defined as h = i0 + i1 + i2 + ... For h = 0 ... sum(Ni)
The iteration is advanced for
-i0 = -h + i1 + i2 + ...
Where HpArg is the argument id for i0, and Args define the arguments ids for i1, i2, ...
The implemented loop pattern looks like:
RAJA::forall<HpExecPolicy>(RangeSegment(0, Nh), [=](RAJA::Index_type h){
RAJA::kernel::forall<Collapse<ExecPolicy, ArgList<1,2,...>, Lambda<0>>>( RAJA::make_tuple(S1, S2, ...), ={
// Compute i0 RAJA::Index_type i0 = h - sum(i1, i2, ...);
// Check if h is in bounds if(h >= 0 && h < Nh){
loop_body(i0, i1, i2, ...); }
});
});