Peano
Loading...
Searching...
No Matches
peano4::stacks::tests::GeneratedTestObject_Flattened Struct Reference

#include <GeneratedTestObject_Flattened.h>

Collaboration diagram for peano4::stacks::tests::GeneratedTestObject_Flattened:

Public Types

enum  ObjectConstruction { NoData }

Public Member Functions

 GeneratedTestObject_Flattened ()
 GeneratedTestObject_Flattened (int __id, tarch::la::Vector< 256, double > __data)
int getId () const
void setId (int value)
tarch::la::Vector< 256, double > getData () const
void setData (const tarch::la::Vector< 256, double > &value)
double getData (int index) const
void setData (int index, double value)
 GeneratedTestObject_Flattened (const GeneratedTestObject_Flattened &copy)=default
int getSenderRank () const
 GeneratedTestObject_Flattened (ObjectConstruction)
std::string toString () const

Static Public Member Functions

static MPI_Datatype getForkDatatype ()
 Hands out MPI datatype if we work without the LLVM MPI extension.
static MPI_Datatype getJoinDatatype ()
static MPI_Datatype getBoundaryExchangeDatatype ()
static MPI_Datatype getMultiscaleDataExchangeDatatype ()
static MPI_Datatype getGlobalCommunciationDatatype ()
static void freeForkDatatype ()
static void freeJoinDatatype ()
static void freeBoundaryExchangeDatatype ()
static void freeMultiscaleDataExchangeDatatype ()
static void freeGlobalCommunciationDatatype ()
static void initDatatype ()
 Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.
static void shutdownDatatype ()
 Free the underlying MPI datatype.
static void send (const peano4::stacks::tests::GeneratedTestObject_Flattened &buffer, int destination, int tag, MPI_Comm communicator)
 In DaStGen (the first version), I had a non-static version of the send as well as the receive.
static void receive (peano4::stacks::tests::GeneratedTestObject_Flattened &buffer, int source, int tag, MPI_Comm communicator)
static void send (const peano4::stacks::tests::GeneratedTestObject_Flattened &buffer, int destination, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator)
 Alternative to the other send() where I trigger a non-blocking send an then invoke the functor until the corresponding MPI_Test tells me that the message went through.
static void receive (peano4::stacks::tests::GeneratedTestObject_Flattened &buffer, int source, int tag, std::function< void()> startCommunicationFunctor, std::function< void()> waitFunctor, MPI_Comm communicator)
static void sendAndPollDanglingMessages (const peano4::stacks::tests::GeneratedTestObject_Flattened &message, int destination, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())
static void receiveAndPollDanglingMessages (peano4::stacks::tests::GeneratedTestObject_Flattened &message, int source, int tag, MPI_Comm communicator=tarch::mpi::Rank::getInstance().getCommunicator())

Private Attributes

int _id
tarch::la::Vector< 256, double > _data
int _senderDestinationRank

Static Private Attributes

static MPI_Datatype Datatype
 Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype.

Detailed Description

Definition at line 45 of file GeneratedTestObject_Flattened.h.

Member Enumeration Documentation

◆ ObjectConstruction

Constructor & Destructor Documentation

◆ GeneratedTestObject_Flattened() [1/4]

peano4::stacks::tests::GeneratedTestObject_Flattened::GeneratedTestObject_Flattened ( )

Definition at line 49 of file GeneratedTestObject_Flattened.h.

Referenced by GeneratedTestObject_Flattened(), and GeneratedTestObject_Flattened().

Here is the caller graph for this function:

◆ GeneratedTestObject_Flattened() [2/4]

peano4::stacks::tests::GeneratedTestObject_Flattened::GeneratedTestObject_Flattened ( int __id,
tarch::la::Vector< 256, double > __data )

◆ GeneratedTestObject_Flattened() [3/4]

peano4::stacks::tests::GeneratedTestObject_Flattened::GeneratedTestObject_Flattened ( const GeneratedTestObject_Flattened & copy)
default

References GeneratedTestObject_Flattened().

Here is the call graph for this function:

◆ GeneratedTestObject_Flattened() [4/4]

peano4::stacks::tests::GeneratedTestObject_Flattened::GeneratedTestObject_Flattened ( ObjectConstruction )

Definition at line 142 of file GeneratedTestObject_Flattened.h.

References GeneratedTestObject_Flattened().

Here is the call graph for this function:

Member Function Documentation

◆ freeBoundaryExchangeDatatype()

void peano4::stacks::tests::GeneratedTestObject_Flattened::freeBoundaryExchangeDatatype ( )
static

◆ freeForkDatatype()

void peano4::stacks::tests::GeneratedTestObject_Flattened::freeForkDatatype ( )
static

◆ freeGlobalCommunciationDatatype()

void peano4::stacks::tests::GeneratedTestObject_Flattened::freeGlobalCommunciationDatatype ( )
static

◆ freeJoinDatatype()

void peano4::stacks::tests::GeneratedTestObject_Flattened::freeJoinDatatype ( )
static

◆ freeMultiscaleDataExchangeDatatype()

void peano4::stacks::tests::GeneratedTestObject_Flattened::freeMultiscaleDataExchangeDatatype ( )
static

◆ getBoundaryExchangeDatatype()

MPI_Datatype peano4::stacks::tests::GeneratedTestObject_Flattened::getBoundaryExchangeDatatype ( )
static

◆ getData() [1/2]

tarch::la::Vector< 256, double > peano4::stacks::tests::GeneratedTestObject_Flattened::getData ( ) const

◆ getData() [2/2]

double peano4::stacks::tests::GeneratedTestObject_Flattened::getData ( int index) const

◆ getForkDatatype()

MPI_Datatype peano4::stacks::tests::GeneratedTestObject_Flattened::getForkDatatype ( )
static

Hands out MPI datatype if we work without the LLVM MPI extension.

If we work with this additional feature, this is the routine where the lazy initialisation is done and the datatype is also cached.

◆ getGlobalCommunciationDatatype()

MPI_Datatype peano4::stacks::tests::GeneratedTestObject_Flattened::getGlobalCommunciationDatatype ( )
static

◆ getId()

int peano4::stacks::tests::GeneratedTestObject_Flattened::getId ( ) const

◆ getJoinDatatype()

MPI_Datatype peano4::stacks::tests::GeneratedTestObject_Flattened::getJoinDatatype ( )
static

◆ getMultiscaleDataExchangeDatatype()

MPI_Datatype peano4::stacks::tests::GeneratedTestObject_Flattened::getMultiscaleDataExchangeDatatype ( )
static

◆ getSenderRank()

int peano4::stacks::tests::GeneratedTestObject_Flattened::getSenderRank ( ) const
Returns
The rank of the sender of an object. It only make ssense to call this routine after you've invoked receive with MPI_ANY_SOURCE.

◆ initDatatype()

void peano4::stacks::tests::GeneratedTestObject_Flattened::initDatatype ( )
static

Wrapper around getDatatype() to trigger lazy evaluation if we use the lazy initialisation.

◆ receive() [1/2]

void peano4::stacks::tests::GeneratedTestObject_Flattened::receive ( peano4::stacks::tests::GeneratedTestObject_Flattened & buffer,
int source,
int tag,
MPI_Comm communicator )
static

◆ receive() [2/2]

void peano4::stacks::tests::GeneratedTestObject_Flattened::receive ( peano4::stacks::tests::GeneratedTestObject_Flattened & buffer,
int source,
int tag,
std::function< void()> startCommunicationFunctor,
std::function< void()> waitFunctor,
MPI_Comm communicator )
static

◆ receiveAndPollDanglingMessages()

void peano4::stacks::tests::GeneratedTestObject_Flattened::receiveAndPollDanglingMessages ( peano4::stacks::tests::GeneratedTestObject_Flattened & message,
int source,
int tag,
MPI_Comm communicator = tarch::mpi::Rank::getInstance().getCommunicator() )
static

References tarch::mpi::Rank::getInstance().

Here is the call graph for this function:

◆ send() [1/2]

void peano4::stacks::tests::GeneratedTestObject_Flattened::send ( const peano4::stacks::tests::GeneratedTestObject_Flattened & buffer,
int destination,
int tag,
MPI_Comm communicator )
static

In DaStGen (the first version), I had a non-static version of the send as well as the receive.

However, this did not work with newer C++11 versions, as a member function using this as pointer usually doesn't see the vtable while the init sees the object from outside, i.e. including a vtable. So this routine now is basically an alias for a blocking MPI_Send.

◆ send() [2/2]

void peano4::stacks::tests::GeneratedTestObject_Flattened::send ( const peano4::stacks::tests::GeneratedTestObject_Flattened & buffer,
int destination,
int tag,
std::function< void()> startCommunicationFunctor,
std::function< void()> waitFunctor,
MPI_Comm communicator )
static

Alternative to the other send() where I trigger a non-blocking send an then invoke the functor until the corresponding MPI_Test tells me that the message went through.

In systems with heavy MPI usage, this can help to avoid deadlocks.

◆ sendAndPollDanglingMessages()

void peano4::stacks::tests::GeneratedTestObject_Flattened::sendAndPollDanglingMessages ( const peano4::stacks::tests::GeneratedTestObject_Flattened & message,
int destination,
int tag,
MPI_Comm communicator = tarch::mpi::Rank::getInstance().getCommunicator() )
static

References tarch::mpi::Rank::getInstance().

Here is the call graph for this function:

◆ setData() [1/2]

void peano4::stacks::tests::GeneratedTestObject_Flattened::setData ( const tarch::la::Vector< 256, double > & value)

◆ setData() [2/2]

void peano4::stacks::tests::GeneratedTestObject_Flattened::setData ( int index,
double value )

◆ setId()

void peano4::stacks::tests::GeneratedTestObject_Flattened::setId ( int value)

◆ shutdownDatatype()

void peano4::stacks::tests::GeneratedTestObject_Flattened::shutdownDatatype ( )
static

Free the underlying MPI datatype.

◆ toString()

std::string peano4::stacks::tests::GeneratedTestObject_Flattened::toString ( ) const

Field Documentation

◆ _data

tarch::la::Vector<256,double> peano4::stacks::tests::GeneratedTestObject_Flattened::_data
private

◆ _id

int peano4::stacks::tests::GeneratedTestObject_Flattened::_id
private

Definition at line 154 of file GeneratedTestObject_Flattened.h.

◆ _senderDestinationRank

int peano4::stacks::tests::GeneratedTestObject_Flattened::_senderDestinationRank
private

Definition at line 161 of file GeneratedTestObject_Flattened.h.

◆ Datatype

MPI_Datatype peano4::stacks::tests::GeneratedTestObject_Flattened::Datatype
staticprivate

Whenever we use LLVM's MPI extension (DaStGe), we rely on lazy initialisation of the datatype.

However, Peano calls init explicitly in most cases. Without the LLVM extension which caches the MPI datatype once constructed, this field stores the type.

Definition at line 170 of file GeneratedTestObject_Flattened.h.


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