YAKL
Public Member Functions | List of all members
yakl::c::Bounds< N, true > Class Template Reference

Describes a set of C-style tightly-nested loops where all loops have lower bounds of 0 strides of 1. More...

#include <YAKL_Bounds_c.h>

Public Member Functions

YAKL_INLINE Bounds (index_t b0, index_t b1=0, index_t b2=0, index_t b3=0, index_t b4=0, index_t b5=0, index_t b6=0, index_t b7=0)
 Declares the total number of iterations for each loop for a set of 1 to 8 tightly-nested loops. More...
 
YAKL_INLINE int dim (int i) const
 Get the total number of iterations for this loop index. More...
 
YAKL_INLINE int lbound (int i) const
 Get the lower loop bound for this loop index. More...
 
YAKL_INLINE int stride (int i) const
 Get the stride for this loop index. More...
 
YAKL_INLINE void unpackIndices (index_t iGlob, int indices[N]) const
 Unpack a global index into N loop indices given bounds and strides. More...
 

Detailed Description

template<int N>
class yakl::c::Bounds< N, true >

Describes a set of C-style tightly-nested loops where all loops have lower bounds of 0 strides of 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
NThe nuber of tightly nested loops being described

Constructor & Destructor Documentation

◆ Bounds()

template<int N>
YAKL_INLINE yakl::c::Bounds< N, true >::Bounds ( index_t  b0,
index_t  b1 = 0,
index_t  b2 = 0,
index_t  b3 = 0,
index_t  b4 = 0,
index_t  b5 = 0,
index_t  b6 = 0,
index_t  b7 = 0 
)
inline

Declares the total number of iterations 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 loops passed to the constructor must match the number of loops, N.

Member Function Documentation

◆ dim()

template<int N>
YAKL_INLINE int yakl::c::Bounds< N, true >::dim ( int  i) const
inline

Get the total number of iterations for this loop index.

◆ lbound()

template<int N>
YAKL_INLINE int yakl::c::Bounds< N, true >::lbound ( int  i) const
inline

Get the lower loop bound for this loop index.

◆ stride()

template<int N>
YAKL_INLINE int yakl::c::Bounds< N, true >::stride ( int  i) const
inline

Get the stride for this loop index.

◆ unpackIndices()

template<int N>
YAKL_INLINE void yakl::c::Bounds< N, true >::unpackIndices ( index_t  iGlob,
int  indices[N] 
) const
inline

Unpack a global index into N loop indices given bounds and strides.


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