MatrixInfo.matrixIter

Generate a mixin string of nested for loops that iterate over the first ndim dimensions of an array of type T (or, preferrably MatrixInfo!T.unqual).

template MatrixInfo(T)
string
matrixIter
(
string arr_name
,
string shape_name
,
string index_name
,
size_t ndim
,
string pre_code
,
string post_code
)
if (
isArray!T ||
)

Parameters

arr_name string

name of array to iterate.

shape_name string

name of array of dimension lengths.

index_name string

name to use for index vector. Declared in a new nested scoped.

ndim size_t

number of dimensions to iterate over.

pre_code string

code to mixin each for loop before beginning the nested for loop.

post_code string

code to mix in to each for loop after finishing the nested for loop.

Meta