18#ifndef __LIB_LIBMPI_MPITARGET_H
19#define __LIB_LIBMPI_MPITARGET_H
Index is a N-sized array of pointers to items of type T.
Represents a Message Passing Interface (MPI) implementation backend.
Implements a Message Passing Interface (MPI) for communication between local cores.
Index< MemoryChannel, MaximumChannels > m_readChannels
Stores all channels for receiving data from other cores.
Result createReadChannel(const Size coreId, const Address memoryBase)
Create a new MPI channel for reading.
Index< MemoryChannel, MaximumChannels > m_writeChannels
Stores all channels for sending data to other cores.
virtual Result getCommRank(MPI_Comm comm, int *rank)
Retrieve communication rank (core id)
Result initializeSlave(int *argc, char ***argv)
Initialize a slave.
virtual Result initialize(int *argc, char ***argv)
Initialize the backend.
static const Size MaximumChannels
Maximum number of communication channels.
virtual Result terminate()
Terminate the backend.
Address getMemoryBaseRead(const Size coreId) const
Get memory address for MPI read communication.
Size m_coreCount
Total number of cores.
virtual Result send(const void *buf, int count, MPI_Datatype datatype, int dest, int tag, MPI_Comm comm)
Synchronous send data.
Result initializeMaster(int *argc, char ***argv)
Initialize the master.
virtual Result getCommSize(MPI_Comm comm, int *size)
Retrieve communication size (total cores)
Memory::Range m_memChannelBase
Memory base address for local MPI communication.
virtual Result receive(void *buf, int count, MPI_Datatype datatype, int source, int tag, MPI_Comm comm, MPI_Status *status)
Synchronous receive data.
Result createWriteChannel(const Size coreId, const Address memoryBase)
Create a new MPI channel for writing.
Size m_coreId
Core identifier is a unique number on each core.
Address getMemoryBaseWrite(const Size coreId) const
Get memory address for MPI write communication.
MPI_Datatype
Named Predefined Datatypes.
uint MPI_Status
Status holder.
uint MPI_Comm
Communicator identifier.
unsigned long Address
A memory address.
unsigned int Size
Any sane size indicator cannot go negative.