137 section(
"Test shape class Strided",
'=');
139 section(
"Test shaper class Shaper");
141 cout << endl <<
"Basic usage:" << endl;
145 #warning intentionally compiling illegal code 146 cout << endl <<
"Illegal with limited dimensionality:" << endl;
150 cout << endl <<
"Usage for an external Fortran shape:" << endl;
153 section(
"Test subarrays and slicing");
175 cout << endl <<
"Basic functionality" << endl;
182 cout << endl <<
"Shape with gaps" << endl;
184 DUMP( shape.shrink(0,3,5).shrink(1,4,6).shrink(2,5,7).shrink(3,6,8) );
189 cout << endl <<
"Small array" << endl;
195 section(
"Test offset functions");
198 CODE( shape.shrink(0,2,4).shrink(1,3,7).shrink(2,5,6).shrink(3,2,3); )
205 CODE( copy.collapse(2,6).collapse(2,3).shift(0,1000).setfirst(1,50); )
208 CODE( copy.collapse(1,7).collapse(2,3).shift(0,1000).setfirst(1,50); )
Shape for a rectangular array layout.
#define AFF_SHAPETEST_CC_VERSION
void section(const char *s, const char l='-')
print headline
#define DUMP(A)
Dump any object through its dump function.
void dump_map(const Strided &shape, const Tdim &i, std::ostream &os)
dump index mapping of shape
#define CODE(C)
Dump code and execute (works like echo)
void steppers(const Strided &shape, const int &nmax=30)
cycle steppers
Shaper class for Fortran layout.