dtlmod::Variable
-
class Variable
A class to translate a piece of data from an application into an object handled by the DTL and its metadata.
Public Functions
-
inline const char *get_cname() const
Helper function to print out the name of the Variable.
- Returns:
The corresponding C-string.
-
inline const size_t get_element_size() const
Get the size of the elements stored in the Variable.
- Returns:
The elements’ size.
-
size_t get_global_size() const
Get the global size of the Variable.
The global size of a Variable corresponds to the product of the number of elements in each dimension of the shape vector by the element size.
- Returns:
The computed size.
-
size_t get_local_size() const
Get the local size object.
The local size of a Variable corresponds to the product of the number of elements in each dimension of the count vector by the element size. If variable was published to the DTL over multiple transactions, multiply the size by the number of transactions.
- Returns:
The computed size.
-
inline const std::string &get_name() const
Helper function to print out the name of the Variable.
- Returns:
The corresponding string.
-
inline const std::vector<size_t> &get_shape() const
Get the shape of the Variable.
- Returns:
A vector of the respective size in each dimension of the Variable.
-
void set_selection(const std::vector<size_t> &start, const std::vector<size_t> &count)
Allow a subscriber to select what subset of a variable it would like to get.
- Parameters:
start – a vector of starting positions in each dimension of the Variable.
count – a vector of number of elements to get in each dimension.
-
void set_transaction_selection(unsigned int begin, unsigned int count)
Allow a subscriber to select what transactions it would like to get.
- Parameters:
begin – the id at which the range of transactions to get begins.
count – the number of transactions in the range.
-
inline void set_transaction_selection(unsigned int transaction_id)
Allow a subscriber to select what transaction it would like to get.
- Parameters:
transaction_id – the id of the transaction to get.
-
inline const char *get_cname() const