47 #ifndef AFF_DUMP_ARRAY_H_VERSION 49 #define AFF_DUMP_ARRAY_H_VERSION \ 50 "AFF_DUMP_ARRAY_H V1.3" 74 for (index[i]=array.
f(i); index[i]<=array.
l(i); index[i]++)
77 os << i <<
": [" << index[i] <<
"]";
84 os.width(5); os <<
" ";
85 for (
int k=array.
f(1); k<=array.
l(1); k++)
90 for (index[0]=array.
f(0); index[0]<=array.
l(0); index[0]++)
92 os.width(5); os << index[0];
93 for (index[1]=array.
f(1); index[1]<=array.
l(1); index[1]++)
97 { os << array(index[0]); }
99 { os << array(index[0], index[1]); }
101 { os << array(index[0], index[1], index[2]); }
103 { os << array(index[0], index[1], index[2], index[3]); }
105 { os << array(index); }
113 for (index[0]=array.
f(0); index[0]<=array.
l(0); index[0]++)
115 os.width(5); os << index[0];
118 { os << array(index[0]); }
120 { os << array(index[0], index[1]); }
122 { os << array(index[0], index[1], index[2]); }
124 { os << array(index[0], index[1], index[2], index[3]); }
126 { os << array(index); }
142 std::ostream& os=std::cout)
145 "ERROR (dump_map): illegal dimensionality");
159 std::ostream& os=std::cout)
162 "ERROR (dump_map): illegal dimensionality");
164 os <<
"Array elements through " << i+1 <<
" dimensional access:" << endl;
177 os <<
"dump of a Array object layout:" << endl;
178 os <<
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" << endl;
185 #endif // AFF_DUMP_ARRAY_H_VERSION (includeguard) Root namespace of library.
factored out SharedHeap dump function (prototypes)
const Trepresentation & representation() const
provide restricted access representation
void dump(const Strided &shape, std::ostream &os)
dump shape
void dump_array_values(const ConstArray< T > &array, const Tdim &i=(Strided::Mmax_dimen-1), std::ostream &os=std::cout)
Dump array values only.
full template array class headers (prototypes)
void dump_array(const ConstArray< T > &array, const Tdim &i=(Strided::Mmax_dimen-1), std::ostream &os=std::cout)
Dump array values.
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.
const Tshape & shape() const
provide access to const shape
void dump_layout(const aff::ConstSharedHeap< T > &sharedheap, std::ostream &os=std::cout)
Dump heap layout.
unsigned short int Tdim
Type to hold an array dimensionality.
const Tsubscript & l(const Tsubscript &i) const
return last index of dimension i
void dump_array_helper(const aff::ConstArray< T > &array, const Tdim &i, const Tdim &j, Strided::TIndexVec &index, std::ostream &os)
recursive usage tests all access functions
Array base classThis is a multidimensional (array) container that uses a strided memory layout (Fortr...
const Tsubscript & f(const Tsubscript &i) const
return first index of dimension i
const Tsubscript & first(const Tsubscript &i) const
access to base class function