libSplash
Public Member Functions | Static Public Member Functions | List of all members
splash::Dimensions Class Reference

#include <Dimensions.hpp>

Public Member Functions

 Dimensions (void)
 
 Dimensions (hsize_t x, hsize_t y, hsize_t z)
 
hsize_t & operator[] (const hsize_t t)
 
const hsize_t & operator[] (const hsize_t t) const
 
Dimensions operator+ (Dimensions const &other) const
 
Dimensions operator- (Dimensions const &other) const
 
Dimensions operator* (Dimensions const &other) const
 
Dimensions operator/ (Dimensions const &other) const
 
Dimensions operator+= (Dimensions const &rhs)
 
Dimensions operator-= (Dimensions const &rhs)
 
bool operator== (Dimensions const &other) const
 
bool operator!= (Dimensions const &other) const
 
std::string toString () const
 
hsize_t * getPointer ()
 
const hsize_t * getPointer () const
 
size_t getScalarSize () const
 
void set (hsize_t x, hsize_t y, hsize_t z)
 
void set (const Dimensions d)
 
uint32_t getDims (void) const
 
void swapDims (uint32_t dims)
 

Static Public Member Functions

static size_t getSize ()
 

Detailed Description

Manages 1-3D size information. Can be used for MPI-positions/-dimensions or data-dimensions.

Definition at line 38 of file Dimensions.hpp.

Constructor & Destructor Documentation

◆ Dimensions() [1/2]

splash::Dimensions::Dimensions ( void  )
inline

Default constructor. Initializes all dimensions to 1.

Definition at line 48 of file Dimensions.hpp.

Here is the caller graph for this function:

◆ Dimensions() [2/2]

splash::Dimensions::Dimensions ( hsize_t  x,
hsize_t  y,
hsize_t  z 
)
inline

Constructor

Parameters
xfirst dimension
ysecond dimension
zthird dimension

Definition at line 59 of file Dimensions.hpp.

Member Function Documentation

◆ getDims()

uint32_t splash::Dimensions::getDims ( void  ) const
inline

Get the number of dimensions.

Returns
Number of dimensions.

Definition at line 252 of file Dimensions.hpp.

Here is the caller graph for this function:

◆ getPointer() [1/2]

hsize_t* splash::Dimensions::getPointer ( )
inline

Get pointer to internal data array.

Returns
Pointer to the internal data array.

Definition at line 192 of file Dimensions.hpp.

Here is the caller graph for this function:

◆ getPointer() [2/2]

const hsize_t* splash::Dimensions::getPointer ( ) const
inline

Get pointer to internal data array.

Returns
Pointer to the internal data array.

Definition at line 201 of file Dimensions.hpp.

◆ getScalarSize()

size_t splash::Dimensions::getScalarSize ( ) const
inline

Get the scalar size.

Returns
Scalar number of elements spanned by all dimensions.

Definition at line 219 of file Dimensions.hpp.

Here is the caller graph for this function:

◆ getSize()

static size_t splash::Dimensions::getSize ( )
inlinestatic

Get the size in bytes of the data array.

Returns
Size in bytes of data array.

Definition at line 210 of file Dimensions.hpp.

Here is the caller graph for this function:

◆ operator!=()

bool splash::Dimensions::operator!= ( Dimensions const &  other) const
inline

Element-wise comparison of two Dimensions

Parameters
otherother Dimensions
Returns
false if equal, true otherwise

Definition at line 171 of file Dimensions.hpp.

◆ operator*()

Dimensions splash::Dimensions::operator* ( Dimensions const &  other) const
inline

Element-wise multiplication of two Dimensions

Parameters
otherother Dimensions
Returns
new multiplied Dimensions

Definition at line 114 of file Dimensions.hpp.

Here is the call graph for this function:

◆ operator+()

Dimensions splash::Dimensions::operator+ ( Dimensions const &  other) const
inline

Element-wise addition of two Dimensions

Parameters
otherother Dimensions
Returns
new added Dimensions

Definition at line 92 of file Dimensions.hpp.

Here is the call graph for this function:

◆ operator+=()

Dimensions splash::Dimensions::operator+= ( Dimensions const &  rhs)
inline

Element-wise addition of Dimensions rhs to this Dimensions

Parameters
rhsother Dimensions
Returns
this Dimensions

Definition at line 136 of file Dimensions.hpp.

◆ operator-()

Dimensions splash::Dimensions::operator- ( Dimensions const &  other) const
inline

Element-wise substraction of two Dimensions

Parameters
otherother Dimensions
Returns
new substracted Dimensions

Definition at line 103 of file Dimensions.hpp.

Here is the call graph for this function:

◆ operator-=()

Dimensions splash::Dimensions::operator-= ( Dimensions const &  rhs)
inline

Element-wise substraction of Dimensions rhs from this Dimensions

Parameters
rhsother Dimensions
Returns
this Dimensions

Definition at line 148 of file Dimensions.hpp.

◆ operator/()

Dimensions splash::Dimensions::operator/ ( Dimensions const &  other) const
inline

Element-wise division of two Dimensions

Parameters
otherother Dimensions
Returns
new divided Dimensions

Definition at line 125 of file Dimensions.hpp.

Here is the call graph for this function:

◆ operator==()

bool splash::Dimensions::operator== ( Dimensions const &  other) const
inline

Element-wise comparison of two Dimensions

Parameters
otherother Dimensions
Returns
true if equal, false otherwise

Definition at line 160 of file Dimensions.hpp.

◆ operator[]() [1/2]

hsize_t& splash::Dimensions::operator[] ( const hsize_t  t)
inline

Returns element t

Parameters
telement index (1-3)
Returns
element

Definition at line 70 of file Dimensions.hpp.

◆ operator[]() [2/2]

const hsize_t& splash::Dimensions::operator[] ( const hsize_t  t) const
inline

Returns element t

Parameters
telement index (1-3)
Returns
element

Definition at line 81 of file Dimensions.hpp.

◆ set() [1/2]

void splash::Dimensions::set ( hsize_t  x,
hsize_t  y,
hsize_t  z 
)
inline

Set dimensions.

Parameters
xFirst dimension.
ySecond dimension.
zThird dimension.

Definition at line 230 of file Dimensions.hpp.

Here is the caller graph for this function:

◆ set() [2/2]

void splash::Dimensions::set ( const Dimensions  d)
inline

Set dimensions.

Parameters
dDimensions object to copy data from.

Definition at line 241 of file Dimensions.hpp.

◆ swapDims()

void splash::Dimensions::swapDims ( uint32_t  dims)
inline

Swaps the dimensions depending on dims.

Parameters
dimsNumber of dimensions for swapping.

Definition at line 269 of file Dimensions.hpp.

Here is the caller graph for this function:

◆ toString()

std::string splash::Dimensions::toString ( ) const
inline

Returns the string representation of this object

Returns
string representation

Definition at line 181 of file Dimensions.hpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: