SG++-Doxygen-Documentation
sgpp::datadriven::MPIRequestPool Class Reference

#include <MPIRequestPool.hpp>

Public Member Functions

size_t createMPIRequestHandle ()
 Allocate storage for one MPI_Request and return the handle to it. More...
 
void deleteMPIRequestHandle (size_t handleIndex)
 Deallocate one MPI_Request based on its handle. More...
 
MPI_Request * getMPIRequestHandle (size_t handleIndex)
 Gets the actual MPI_Request from its handle. More...
 
MPI_Request * getMPIRequests ()
 Fetches the start of the MPI_Requests held sequentially in memory for use in MPI operations. More...
 
size_t size ()
 Gets the number of stored MPI_Requests currently held in the pool. More...
 

Protected Member Functions

void printPoolStatistics () const
 Prints grid pool usage statistics for performance analysis. More...
 

Protected Attributes

std::set< size_t > freedRequests
 Holds indices to requests that were freed but could not yet be deallocated for later use or deallocation. More...
 
std::vector< MPI_Request > mpiRequestStorage
 Holds the actual MPI_Requests sequentially in memory. More...
 

Member Function Documentation

◆ createMPIRequestHandle()

size_t sgpp::datadriven::MPIRequestPool::createMPIRequestHandle ( )

Allocate storage for one MPI_Request and return the handle to it.

Returns
The handle to the newly allocated MPI_Request.

References freedRequests, mpiRequestStorage, and printPoolStatistics().

Referenced by sgpp::datadriven::PendingMPIRequest::PendingMPIRequest().

◆ deleteMPIRequestHandle()

void sgpp::datadriven::MPIRequestPool::deleteMPIRequestHandle ( size_t  handleIndex)

Deallocate one MPI_Request based on its handle.

Parameters
handleIndexThe handle for which to delete.

References freedRequests, mpiRequestStorage, and printPoolStatistics().

Referenced by sgpp::datadriven::PendingMPIRequest::~PendingMPIRequest().

◆ getMPIRequestHandle()

MPI_Request * sgpp::datadriven::MPIRequestPool::getMPIRequestHandle ( size_t  handleIndex)

Gets the actual MPI_Request from its handle.

Parameters
handleIndexThe handle to the MPI_Request.
Returns
The MPI_Request itself.

References mpiRequestStorage.

Referenced by sgpp::datadriven::PendingMPIRequest::getMPIRequestFromHandle(), and getMPIRequests().

◆ getMPIRequests()

MPI_Request * sgpp::datadriven::MPIRequestPool::getMPIRequests ( )

Fetches the start of the MPI_Requests held sequentially in memory for use in MPI operations.

Returns
The start in memory of the MPI_Requests storage.

References getMPIRequestHandle().

Referenced by sgpp::datadriven::MPIMethods::executeMPIWaitAny().

◆ printPoolStatistics()

void sgpp::datadriven::MPIRequestPool::printPoolStatistics ( ) const
inlineprotected

Prints grid pool usage statistics for performance analysis.

References D, freedRequests, and mpiRequestStorage.

Referenced by createMPIRequestHandle(), and deleteMPIRequestHandle().

◆ size()

size_t sgpp::datadriven::MPIRequestPool::size ( )

Gets the number of stored MPI_Requests currently held in the pool.

Returns
The number of MPI_Requests

References mpiRequestStorage.

Referenced by sgpp::datadriven::MPIMethods::executeMPIWaitAny().

Member Data Documentation

◆ freedRequests

std::set<size_t> sgpp::datadriven::MPIRequestPool::freedRequests
protected

Holds indices to requests that were freed but could not yet be deallocated for later use or deallocation.

Referenced by createMPIRequestHandle(), deleteMPIRequestHandle(), and printPoolStatistics().

◆ mpiRequestStorage

std::vector<MPI_Request> sgpp::datadriven::MPIRequestPool::mpiRequestStorage
protected

Holds the actual MPI_Requests sequentially in memory.

Referenced by createMPIRequestHandle(), deleteMPIRequestHandle(), getMPIRequestHandle(), printPoolStatistics(), and size().


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