AQUAgpusph 4.1.2
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Static Public Member Functions | Protected Attributes
Aqua::CalcServer::MPISync::Exchanger Class Reference

Interprocess array synchronization base class. More...

#include <CalcServer/MPISync.h>

Inheritance diagram for Aqua::CalcServer::MPISync::Exchanger:
Inheritance graph
[legend]
Collaboration diagram for Aqua::CalcServer::MPISync::Exchanger:
Collaboration graph
[legend]

Data Structures

struct  MPIType
 Data structure to store the type information required by MPI. More...
 

Public Member Functions

 Exchanger (const std::string name, InputOutput::ArrayVariable *mask, const std::vector< InputOutput::ArrayVariable * > fields, const std::vector< void * > field_hosts, const unsigned int proc)
 
 ~Exchanger ()
 
const std::string name ()
 Parent tool name.
 

Static Public Member Functions

static const MPIType typeToMPI (std::string t)
 MPI type descriptor.
 

Protected Attributes

InputOutput::ArrayVariable_mask
 Mask.
 
std::vector< InputOutput::ArrayVariable * > _fields
 Field.
 
unsigned int _proc
 Processor.
 
unsigned int _n
 Total number of elements.
 
std::vector< void * > _fields_host
 Host memory arrays to download, send, receive and upload the data.
 

Detailed Description

Interprocess array synchronization base class.

This class is used to setup host storages for the send & receive operations, to provide some helper functions to translate

Constructor & Destructor Documentation

◆ Exchanger()

Aqua::CalcServer::MPISync::Exchanger::Exchanger ( const std::string  name,
InputOutput::ArrayVariable mask,
const std::vector< InputOutput::ArrayVariable * >  fields,
const std::vector< void * >  field_hosts,
const unsigned int  proc 
)

Constructor

Parameters
nameThe same name that the owner tool (See Aqua::CalcServer::MPISync)
maskAlready sorted mask
fieldsAlready sorted fields
field_hostsAllocated host memory to temporary copy the data, while it is sent to another process or it is uploaded to the computational device either
procProcess to which the data shall be sent

◆ ~Exchanger()

Aqua::CalcServer::MPISync::Exchanger::~Exchanger ( )

Destructor.

Member Function Documentation

◆ name()

const std::string Aqua::CalcServer::MPISync::Exchanger::name ( )
inline

Parent tool name.

Returns
Parent tool name

◆ typeToMPI()

static const MPIType Aqua::CalcServer::MPISync::Exchanger::typeToMPI ( std::string  t)
static

MPI type descriptor.

Parameters
tType string
Returns
MPI type descriptor. In case type cannot be handled, a MPI::DATATYPE_NULL type will be returned

Field Documentation

◆ _fields

std::vector<InputOutput::ArrayVariable*> Aqua::CalcServer::MPISync::Exchanger::_fields
protected

Field.

◆ _fields_host

std::vector<void*> Aqua::CalcServer::MPISync::Exchanger::_fields_host
protected

Host memory arrays to download, send, receive and upload the data.

◆ _mask

InputOutput::ArrayVariable* Aqua::CalcServer::MPISync::Exchanger::_mask
protected

Mask.

◆ _n

unsigned int Aqua::CalcServer::MPISync::Exchanger::_n
protected

Total number of elements.

◆ _proc

unsigned int Aqua::CalcServer::MPISync::Exchanger::_proc
protected

Processor.


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