ls1-MarDyn
ls1-MarDyn molecular dynamics code
Public Member Functions | List of all members
CollectiveCommBaseInterface Class Referenceabstract

This class is provides an interface for the base class of the collective communication. More...

#include <CollectiveCommBaseInterface.h>

Inheritance diagram for CollectiveCommBaseInterface:
CollectiveCommBase CollectiveCommunicationInterface CollectiveCommunication CollectiveCommunication CollectiveCommunicationNonBlocking CollectiveCommunicationSingleNonBlocking CollectiveCommunicationSingleNonBlocking

Public Member Functions

virtual ~CollectiveCommBaseInterface ()
 virtual destructor
 
virtual void appendInt (int intValue)=0
 
virtual void appendUnsLong (unsigned long unsLongValue)=0
 
virtual void appendFloat (float floatValue)=0
 
virtual void appendDouble (double doubleValue)=0
 
virtual void appendLongDouble (long double longDoubleValue)=0
 
virtual void broadcast (int=0)=0
 
virtual void allreduceSum ()=0
 Performs an all-reduce (sum) More...
 
virtual void allreduceCustom (ReduceType type)=0
 
virtual void scanSum ()=0
 Performs a scan (sum) More...
 
virtual int getInt ()=0
 
virtual unsigned long getUnsLong ()=0
 
virtual float getFloat ()=0
 
virtual double getDouble ()=0
 
virtual long double getLongDouble ()=0
 
virtual void finalize ()=0
 delete memory and MPI_Type More...
 
virtual size_t getTotalSize ()=0
 

Detailed Description

This class is provides an interface for the base class of the collective communication.

Refactored to increase code-reuse

Author
Steffen Seckler

To fully understand the purpose of this class, read the documentation of the class CollectiveCommunication. The application developer should not have to care whether the program will be executed in parallel or sequentially. The only thing that the application developer should know that there might be several processes and at some point in the simulation those have to do a collective communication to broadcast or reduce values. Those values are given to the domain decomposition method, the communication command is executed by the domain decomp and the values can be read again. This class just has to ensure that this also works if there is no real domain decomposition but the class DomainDecompBase is used.

Member Function Documentation

◆ allreduceCustom()

virtual void CollectiveCommBaseInterface::allreduceCustom ( ReduceType  type)
pure virtual

Performs an allreduce operation with a custom reduce type.

Parameters
typethe type of the operation

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ allreduceSum()

virtual void CollectiveCommBaseInterface::allreduceSum ( )
pure virtual

Performs an all-reduce (sum)

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ appendDouble()

virtual void CollectiveCommBaseInterface::appendDouble ( double  doubleValue)
pure virtual

Append a double value to the list of values to be stored

Parameters
doubleValuethe value

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ appendFloat()

virtual void CollectiveCommBaseInterface::appendFloat ( float  floatValue)
pure virtual

Append a float value to the list of values to be stored

Parameters
floatValuethe value

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ appendInt()

virtual void CollectiveCommBaseInterface::appendInt ( int  intValue)
pure virtual

Append an int value to the list of values to be stored

Parameters
intValuethe value

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ appendLongDouble()

virtual void CollectiveCommBaseInterface::appendLongDouble ( long double  longDoubleValue)
pure virtual

Append a long double value to the list of values to be stored

Parameters
longDoubleValuethe value

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ appendUnsLong()

virtual void CollectiveCommBaseInterface::appendUnsLong ( unsigned long  unsLongValue)
pure virtual

Append a unsigned long value to the list of values to be stored

Parameters
unsLongValuethe value

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ broadcast()

virtual void CollectiveCommBaseInterface::broadcast ( int  = 0)
pure virtual

Performs a broadcast of the values to all processes in the communicator

Parameters
rootof the broadcast

Implemented in CollectiveCommunication, CollectiveCommunicationNonBlocking, and CollectiveCommBase.

◆ finalize()

virtual void CollectiveCommBaseInterface::finalize ( )
pure virtual

◆ getDouble()

virtual double CollectiveCommBaseInterface::getDouble ( )
pure virtual

Get the next value from the list, which must be double

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implemented in CollectiveCommBase, and CollectiveCommunicationNonBlocking.

◆ getFloat()

virtual float CollectiveCommBaseInterface::getFloat ( )
pure virtual

Get the next value from the list, which must be float

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implemented in CollectiveCommBase, and CollectiveCommunicationNonBlocking.

◆ getInt()

virtual int CollectiveCommBaseInterface::getInt ( )
pure virtual

Get the next value from the list, which must be int

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order3

Returns
the value

Implemented in CollectiveCommBase, and CollectiveCommunicationNonBlocking.

◆ getLongDouble()

virtual long double CollectiveCommBaseInterface::getLongDouble ( )
pure virtual

Get the next value from the list, which must be long double

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implemented in CollectiveCommBase, and CollectiveCommunicationNonBlocking.

◆ getTotalSize()

virtual size_t CollectiveCommBaseInterface::getTotalSize ( )
pure virtual

get the size of the entire object allocated memory

Returns
size of the dynamically allocated memory in bytes

Implemented in CollectiveCommBase, CollectiveCommunication, and CollectiveCommunicationNonBlocking.

◆ getUnsLong()

virtual unsigned long CollectiveCommBaseInterface::getUnsLong ( )
pure virtual

Get the next value from the list, which must be unsigned long

no check is performed that the type is correct, so we rely on the sanity of the programmer to ensure FIFO ordering w.r.t. append-get order

Returns
the value

Implemented in CollectiveCommBase, and CollectiveCommunicationNonBlocking.

◆ scanSum()

virtual void CollectiveCommBaseInterface::scanSum ( )
pure virtual

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