23 #ifndef DIMENSIONS_HPP 24 #define DIMENSIONS_HPP 41 hsize_t s[DSP_DIM_MAX];
94 return Dimensions(s[0] + other[0], s[1] + other[1], s[2] + other[2]);
105 return Dimensions(s[0] - other[0], s[1] - other[1], s[2] - other[2]);
116 return Dimensions(s[0] * other[0], s[1] * other[1], s[2] * other[2]);
127 return Dimensions(s[0] / other[0], s[1] / other[1], s[2] / other[2]);
162 return s[0] == other[0] && s[1] == other[1] && s[2] == other[2];
173 return !(*
this == other);
183 std::stringstream stream;
184 stream <<
"(" << s[0] <<
"," << s[1] <<
"," << s[2] <<
")";
212 return DSP_DIM_MAX *
sizeof (hsize_t);
221 return s[0] * s[1] * s[2];
230 inline void set(hsize_t x, hsize_t y, hsize_t z)
254 uint32_t dims = DSP_DIM_MAX;
272 hsize_t tmp2[DSP_DIM_MAX] = {s[2], s[1], s[0]};
281 for (uint32_t i = 0; i < 3; i++)
Dimensions operator*(Dimensions const &other) const
bool operator==(Dimensions const &other) const
Dimensions operator+(Dimensions const &other) const
Dimensions operator+=(Dimensions const &rhs)
std::string toString() const
uint32_t getDims(void) const
Dimensions operator/(Dimensions const &other) const
size_t getScalarSize() const
void swapDims(uint32_t dims)
const hsize_t * getPointer() const
Dimensions operator-=(Dimensions const &rhs)
const hsize_t & operator[](const hsize_t t) const
Dimensions(hsize_t x, hsize_t y, hsize_t z)
hsize_t & operator[](const hsize_t t)
bool operator!=(Dimensions const &other) const
Dimensions operator-(Dimensions const &other) const