mirror of
https://github.com/paboyle/Grid.git
synced 2025-06-19 00:07:05 +01:00
Tweak to initialisation example
This commit is contained in:
@ -187,10 +187,10 @@ namespace Grid {
|
||||
for( std::size_t j = 0; j < NumScalars; j++ ) {
|
||||
// if constexpr is C++ 17 ... but otherwise need two specialisations (Container vs Scalar)
|
||||
if constexpr ( InnerRank == 0 ) {
|
||||
lambda( * pScalar, Seq++, &MyIndex[0] );
|
||||
lambda( * pScalar, Seq++, MyIndex );
|
||||
} else {
|
||||
for( typename Scalar::scalar_type &Source : * pScalar ) {
|
||||
lambda(Source, Seq++, &MyIndex[0] );
|
||||
lambda(Source, Seq++, MyIndex );
|
||||
// Now increment SubIndex
|
||||
for( auto i = rank + InnerRank - 1; i != rank - 1 && ++MyIndex[i] == Dims[i]; i-- )
|
||||
MyIndex[i] = 0;
|
||||
|
Reference in New Issue
Block a user