|
RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
|
#include <types.hpp>
Direct assumes the loop has enough iterations for all of the indices and maps directly from an iteration to an index.
For example a loop with 5 iterations mapping indices from a range of size 4. int iterations = 5; int range_size = 4; for (int i = 0; i < iterations; ++i) { if (i < range_size) { int index = i; printf("%i -> {%i}", i, index); } else { printf("%i -> {safely-ignored}", i); } } // 0 -> {0} // 1 -> {1} // 2 -> {2} // 3 -> {3} // 4 -> {safely-ignored}