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

#include <DataContainer.hpp>

Public Member Functions

 DataContainer ()
 
virtual ~DataContainer ()
 
void add (DomainData *entry)
 
size_t getNumSubdomains ()
 
size_t getNumElements ()
 
Dimensions getSize () const
 
Dimensions getOffset () const
 
Dimensions getBack () const
 
DomainDatagetIndex (size_t index)
 
DomainDataget (size_t x)
 
DomainDataget (size_t x, size_t y)
 
DomainDataget (size_t x, size_t y, size_t z)
 
void * getElement (size_t index)
 

Detailed Description

Container for storing domain-annotated data representing a specific subdomain. The container contains information on the specific subdomain and its global domain. This should regularly not be constructed by a user but internally, only.

Definition at line 40 of file DataContainer.hpp.

Constructor & Destructor Documentation

◆ DataContainer()

splash::DataContainer::DataContainer ( )
inline

Constructor.

Definition at line 47 of file DataContainer.hpp.

◆ ~DataContainer()

virtual splash::DataContainer::~DataContainer ( )
inlinevirtual

Destructor.

Deletes all subdomains it contains.

Definition at line 58 of file DataContainer.hpp.

Member Function Documentation

◆ add()

void splash::DataContainer::add ( DomainData entry)
inline

Internal use only!

Definition at line 73 of file DataContainer.hpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [1/3]

DomainData* splash::DataContainer::get ( size_t  x)
inline

Returns a pointer to the DomainData with index (x) for 1-dimensional domains.

Parameters
xIndex of subdomain partition.
Returns
Subdomain partition.

Definition at line 175 of file DataContainer.hpp.

◆ get() [2/3]

DomainData* splash::DataContainer::get ( size_t  x,
size_t  y 
)
inline

Returns a pointer to the DomainData with index (x, y) for 2-dimensional domains.

Parameters
xFirst dimension index of subdomain partition.
ySecond dimension index of subdomain partition.
Returns
Subdomain partition.

Definition at line 190 of file DataContainer.hpp.

◆ get() [3/3]

DomainData* splash::DataContainer::get ( size_t  x,
size_t  y,
size_t  z 
)
inline

Returns a pointer to the DomainData with index (x, y, z) for 3-dimensional domains.

Parameters
xFirst dimension index of subdomain partition.
ySecond dimension index of subdomain partition.
zThird dimension index of subdomain partition.
Returns
Subdomain partition.

Definition at line 206 of file DataContainer.hpp.

◆ getBack()

Dimensions splash::DataContainer::getBack ( ) const
inline

Returns the end of the partition represented by this container which is the combination of its offset and size - 1.

Returns
Last index of the total domain partition in this container.

Definition at line 150 of file DataContainer.hpp.

◆ getElement()

void* splash::DataContainer::getElement ( size_t  index)
inline

Returns a pointer to the data element with global index.

Parameters
indexIndex among all elements in this container, see DataContainer::getNumElements.
Returns
Pointer to element.

Definition at line 221 of file DataContainer.hpp.

Here is the call graph for this function:

◆ getIndex()

DomainData* splash::DataContainer::getIndex ( size_t  index)
inline

Returns the pointer to the DomainData with the specified index.

Parameters
indexIndex of subdomain partition.
Returns
Subdomain partition.

Definition at line 161 of file DataContainer.hpp.

Here is the caller graph for this function:

◆ getNumElements()

size_t splash::DataContainer::getNumElements ( )
inline

Returns the total number of elements in all subdomains of this container.

Returns
Total number of elements in this container.

Definition at line 111 of file DataContainer.hpp.

◆ getNumSubdomains()

size_t splash::DataContainer::getNumSubdomains ( )
inline

Returns the number of subdomain partitions in the container.

Returns
Number of subdomain partitions.

Definition at line 101 of file DataContainer.hpp.

Here is the caller graph for this function:

◆ getOffset()

Dimensions splash::DataContainer::getOffset ( ) const
inline

Returns the offset of the partition represented by this container.

Returns
Offset of total domain partition in this container.

Definition at line 139 of file DataContainer.hpp.

◆ getSize()

Dimensions splash::DataContainer::getSize ( ) const
inline

Returns the size of the partition represented by this container.

Returns
Size of total domain partition in this container.

Definition at line 129 of file DataContainer.hpp.


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