RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
RAJA::iteration_mapping::Contiguousloop< max_iterations > Struct Template Reference

#include <types.hpp>

Inheritance diagram for RAJA::iteration_mapping::Contiguousloop< max_iterations >:
RAJA::iteration_mapping::ContiguousLoopBase RAJA::iteration_mapping::LoopBase

Detailed Description

template<size_t max_iterations>
struct RAJA::iteration_mapping::Contiguousloop< max_iterations >

Contiguousloop assumes the loop has fewer iterations than indices and maps a single iteration to a range of contiguous indices.

For example a loop with 3 iterations mapping indices from a range of size 8. int iterations = 3; int range_size = 8; int indices_per_iteration = (range_size + iterations-1) / iterations; for (int i = 0; i < iterations; ++i) { printf("%i -> {", i); int index = indices_per_iteration*i; if (index < range_size) { printf("%i", i); for (++index; index < indices_per_iteration*(i+1) && index < range_size; ++index) { printf(", %i", i); } } printf("}"); } // 0 -> {0, 1, 2} // 1 -> {3, 4, 5} // 2 -> {6, 7}


The documentation for this struct was generated from the following file: