Muster
 All Classes Namespaces Files Functions Variables Typedefs Macros
mpi_utils.h File Reference

Overloaded utility functions to convert between arbitrary C/C++ types and MPI types, custom typedefs for cstdlib types like size_t, and a wrapper for MPI_Pack_Size. More...

#include <iostream>
#include <cstdlib>
#include <stdint.h>
#include <mpi.h>
Include dependency graph for mpi_utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MPI_SIZE_T   (mpi_typeof(size_t()))
 
#define MPI_INTPTR_T   (mpi_typeof(intptr_t()))
 
#define MPI_UINTPTR_T   (mpi_typeof(uintptr_t()))
 

Functions

MPI_Datatype mpi_typeof (char)
 
MPI_Datatype mpi_typeof (signed short)
 
MPI_Datatype mpi_typeof (unsigned char)
 
MPI_Datatype mpi_typeof (signed long long)
 
MPI_Datatype mpi_typeof (double)
 
MPI_Datatype mpi_typeof (long double)
 
MPI_Datatype mpi_typeof (std::pair< int, int >)
 
MPI_Datatype mpi_typeof (std::pair< float, int >)
 
MPI_Datatype mpi_typeof (std::pair< double, int >)
 
MPI_Datatype mpi_typeof (std::pair< long double, int >)
 
MPI_Datatype mpi_typeof (std::pair< short, int >)
 
int mpi_packed_size (int count, MPI_Datatype type, MPI_Comm comm)
 Expression-ifies the overly C-ish MPI_Pack_size function. More...
 
int pmpi_packed_size (int count, MPI_Datatype type, MPI_Comm comm)
 PMPI binding for mpi_packed_size(). More...
 

Detailed Description

Overloaded utility functions to convert between arbitrary C/C++ types and MPI types, custom typedefs for cstdlib types like size_t, and a wrapper for MPI_Pack_Size.

Definition in file mpi_utils.h.

Macro Definition Documentation

#define MPI_INTPTR_T   (mpi_typeof(intptr_t()))

Definition at line 40 of file mpi_utils.h.

#define MPI_SIZE_T   (mpi_typeof(size_t()))

Definition at line 39 of file mpi_utils.h.

#define MPI_UINTPTR_T   (mpi_typeof(uintptr_t()))

Definition at line 41 of file mpi_utils.h.

Function Documentation

int mpi_packed_size ( int  count,
MPI_Datatype  type,
MPI_Comm  comm 
)
inline

Expression-ifies the overly C-ish MPI_Pack_size function.

Just returns the size instead of requring a temporary.

Definition at line 47 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( char  )
inline

Definition at line 18 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( signed  short)
inline

Definition at line 19 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( unsigned  char)
inline

Definition at line 22 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( signed long  long)
inline

Definition at line 26 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( double  )
inline

Definition at line 27 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( long  double)
inline

Definition at line 28 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( std::pair< int, int >  )
inline

Definition at line 29 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( std::pair< float, int >  )
inline

Definition at line 30 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( std::pair< double, int >  )
inline

Definition at line 31 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( std::pair< long double, int >  )
inline

Definition at line 32 of file mpi_utils.h.

MPI_Datatype mpi_typeof ( std::pair< short, int >  )
inline

Definition at line 33 of file mpi_utils.h.

int pmpi_packed_size ( int  count,
MPI_Datatype  type,
MPI_Comm  comm 
)
inline

PMPI binding for mpi_packed_size().

Definition at line 56 of file mpi_utils.h.

Muster. Copyright © 2010, Lawrence Livermore National Laboratory, LLNL-CODE-433662.
Distribution of Muster and its documentation is subject to terms of the Muster LICENSE.
Generated on Thu Sep 1 2016 using Doxygen 1.8.5