51 #ifndef AFF_SHAPER_H_VERSION 53 #define AFF_SHAPER_H_VERSION \ 75 AFF_assert((last>=1),
"ERROR (shaper): invalid limit");
84 AFF_assert((last>=first),
"ERROR (shaper): invalid index range");
94 AFF_assert((last>=first),
"ERROR (shaper): invalid index range");
95 AFF_assert((maxlast>=last),
"ERROR (shaper): invalid alloc size");
103 AFF_assert((last>=1),
"ERROR (shaper): invalid limit");
114 AFF_assert((last>=first),
"ERROR (shaper): invalid index range");
126 AFF_assert((last>=first),
"ERROR (shaper): invalid index range");
127 AFF_assert((maxlast>=last),
"ERROR (shaper): invalid alloc size");
147 "ERROR (Shaper): you use too many dimensions!");
157 #endif // AFF_SHAPER_H_VERSION (includeguard) Shaper(const Tsubscript &last)
First dimension is defined by constructor.
void check_dim() const
check dimensions
Root namespace of library.
Shape for a rectangular array layout.
Shaper & operator()(const Tsubscript &last)
Other dimensions are defined by bracket operator.
Tdim Mdim
next dimension to set
Strided Tshape
Type of Shape class.
exceptions and error handling macros (prototypes)
Tshape::TIndexVec Mfirst
limits
static const Tdim Mmax_dimen
instantiate static member (otherwise the linker won't find it)
#define AFF_assert(C, M)
Check an assertion and report by throwing an exception.
shape of s strided array (prototypes)
Shaper(const Tsubscript &first, const Tsubscript &last, const Tsubscript &maxlast)
First dimension is defined by constructor.
Tshape::TIndexVec Mmaxlast
Shaper(const Tsubscript &first, const Tsubscript &last)
First dimension is defined by constructor.
unsigned short int Tdim
Type to hold an array dimensionality.
ptrdiff_t Tsubscript
Type to hold an array's subscript value.
Shaper class for Fortran layout.
Strided & shrink(const TIndexVec &last)
subarray