AFF --- A container for numbers (array) by Friederich and Forbriger.

◆ dump() [1/5]

void aff::dump ( const Strided shape,
std::ostream &  os 
)

dump shape

Dump array shape information.

Examples:
tests/helpertest.cc.

Definition at line 49 of file dump.cc.

References aff::Strided::first(), aff::Strided::first_offset(), aff::Strided::last(), aff::Strided::last_offset(), aff::Strided::memory_size(), aff::Strided::Mmax_dimen, aff::Strided::size(), and aff::Strided::stride().

Referenced by dump(), dump_array(), dump_map(), and main().

50 {
51  os << "dump of a Strided object:" << endl;
52  os << " index ranges: ";
53  for (Tsize i=0; i<Strided::Mmax_dimen; i++)
54  {
55  os << "[" << shape.first(i) << ":" << shape.last(i) << "]";
56  }
57  os << endl;
58  os << " strides: ";
59  for (Tsize i=0; i<Strided::Mmax_dimen; i++)
60  {
61  if (i>0) os << ", ";
62  os << shape.stride(i);
63  }
64  os << endl;
65  os << " total number of mapped elements: "
66  << shape.size() << endl;
67  os << " total address range in memory: ["
68  << shape.first_offset() << ":" << shape.last_offset() << "] = "
69  << shape.memory_size() << " positions" << endl;
70 }
size_t Tsize
Type to hold the size of an array dimension.
Definition: types.h:51
Here is the call graph for this function:
Here is the caller graph for this function: