Describes a set of C-style tightly-nested loops where at least one loop has a lower bound other than 0 or a stride other than 1.
More...
template<int N>
class yakl::c::Bounds< N, false >
Describes a set of C-style tightly-nested loops where at least one loop has a lower bound other than 0 or a stride other than 1.
Also contains functions to unpack indices from a single global index given the loop bounds and strides. Order is always left-most loop is the slowest varying, and right-most loop is the fastest varying.
- Parameters
-
| N | The nuber of tightly nested loops being described |
Declares the bounds for each loop for a set of 1 to 8 tightly-nested loops.
Order is always left-most loop is the slowest varying, and right-most loop is the fastest varying. Number of loop bounds passed to the constructor must match the number of loops, N. Recall only positive strides are allowed because requiring a negative stride implies the loop order matters, which means your kernel is not trivially parallel, and yakl::c::parallel_for should not be used.
Each parameter accepts either:
- A single integer, for which lower bound defaults to
0, and stride defaults to 1
- An initializer list with two entries:
{lower_bound,upper_bound} (inclusive), and stride defaults to 1
- An initializer list with three entries:
{lower,upper,stride}, where stride is positive