Schnek
schnek::RangeFortranIterationPolicy< rank > Struct Template Reference

Iteration policy that iterates over a domain in Fortran-order. More...

#include <range-iteration.hpp>

Static Public Member Functions

template<class RangeType , typename Func >
static void forEach (const RangeType &range, Func func)
 Call a function for each index in the range. More...
 

Detailed Description

template<size_t rank>
struct schnek::RangeFortranIterationPolicy< rank >

Iteration policy that iterates over a domain in Fortran-order.

Template Parameters
rankthe rank of the domain to iterate over

Member Function Documentation

◆ forEach()

template<size_t rank>
template<class RangeType , typename Func >
void schnek::RangeFortranIterationPolicy< rank >::forEach ( const RangeType &  range,
Func  func 
)
inlinestatic

Call a function for each index in the range.

The range will be iterated over in Fortran-ordering

Template Parameters
RangeTypeThe range type. Requires accessor methods getLo() and getHi() that return the array-like bounds of the range with length rank
FuncThe function that will be called with an array-like index of length rank
Parameters
rangeThe range over which to iterate
funcThe function that will be called for each position in the range

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