STAPL API Reference          
Overview   Containers   Algorithms   Views   Skeletons   Run-Time System
Modules     Classes    
List of all members | Public Member Functions | Public Types
stapl::composition::my_container< T > Struct Template Reference

Used in conjunction with mpi_messager to implement RDMA style transmission of edge_container values. Used to back edge values of type cm_res_view. More...

Public Member Functions

T * allocate (size_t n)
 Helper function used by constructors to initialize m_storage_ptr to be large enough to hold the mpi header plus n elements of type T. More...
 
 my_container (size_t n)
 
 my_container (size_t n, T const &init)
 
 my_container (my_container const &other)
 
size_t mpi_size (void) const
 Return the size of the buffer that should be reported to MPI commands (i.e., include the MPI header used by this object).
 
void * mpi_buffer (void)
 Return pointer to raw buffer that mpi_messager will pass to MPI_Irecv to receive the inbound message.
 
void set_mpi_header (size_t tg_id, size_t tid, size_t size)
 Called by mpi_messager to initialize the mpi header of prior to transmission via MPI_Isend. More...
 
std::pair< size_t, size_t > get_mpi_header (void)
 Return the source location and PARAGRAPH identifier fields stores in the class to the caller (mpi_messager).
 
void sync_size (void)
 Called in runtime in mpi_messager upon arrival of MPI message. Sets logical size based on the size set in the message header. Called prior to notify edge_container of value arrival.
 
void resize (size_t n)
 Set size of valid elements in buffer to n.
 
my_containeroperator= (my_container const &other)
 
size_t size (void) const
 
const_iterator begin (void) const
 Return an const_iterator to the beginning of the sequence of elements this container stores.
 
iterator begin (void)
 Return an iterator to the beginning of the sequence of elements this container stores.
 
const_iterator end (void) const
 Return an const_iterator to the end (one past the last element) of the sequence of elements this container stores.
 
iterator end (void)
 Return an iterator to the end (one past the last element) of the sequence of elements this container stores.
 
reference operator[] (std::size_t idx)
 Return reference to element in buffer at index idx.
 
const_reference operator[] (std::size_t idx) const
 Return reference to element in buffer at index idx.
 
void reset (void)
 Reset the size to the maximum capacity this buffer can hold.
 

Public Types

typedef T value_type
 
typedef T & reference
 
typedef T const & const_reference
 
typedef T * iterator
 
typedef T const * const_iterator
 

Detailed Description

template<typename T>
struct stapl::composition::my_container< T >

Used in conjunction with mpi_messager to implement RDMA style transmission of edge_container values. Used to back edge values of type cm_res_view.

Member Function Documentation

◆ allocate()

template<typename T >
T* stapl::composition::my_container< T >::allocate ( size_t  n)

Helper function used by constructors to initialize m_storage_ptr to be large enough to hold the mpi header plus n elements of type T.

Returns
Pointer to initialized storage.

◆ set_mpi_header()

template<typename T >
void stapl::composition::my_container< T >::set_mpi_header ( size_t  tg_id,
size_t  tid,
size_t  size 
)

Called by mpi_messager to initialize the mpi header of prior to transmission via MPI_Isend.

Parameters
tg_idThe identifier of the associated PARAGRAPH.
tidThe identifier of the task that produced this value.
sizeThe number of elements in this value.

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