Changeset 1984 for XIOS/dev/dev_ym/XIOS_COUPLING/src/mpi_tools.hpp
- Timestamp:
- 12/06/20 22:14:56 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/mpi_tools.hpp
r1759 r1984 1 1 #ifndef __XIOS_MPI_TOOLS_HPP__ 2 #define __XIOS_MPI_TOOLS_HPP__ 2 3 3 4 #include <string> … … 7 8 8 9 int MPI_Bcast_string(std::string& str, int root, MPI_Comm comm) ; 10 11 template<typename T> 12 MPI_Datatype MPI_GetType(void) ; 13 14 template<> 15 MPI_Datatype MPI_GetType<char>(void) { return MPI_CHAR ;} 16 17 template<> 18 MPI_Datatype MPI_GetType<short int>(void) { return MPI_SHORT ;} 19 20 template<> 21 MPI_Datatype MPI_GetType<int>(void) { return MPI_INT ;} 22 23 template<> 24 MPI_Datatype MPI_GetType<size_t>(void) { return MPI_SIZE_T ;} 25 26 template<> 27 MPI_Datatype MPI_GetType<float>(void) { return MPI_FLOAT ;} 28 29 template<> 30 MPI_Datatype MPI_GetType<double>(void) { return MPI_DOUBLE ;} 31 32 template<> 33 MPI_Datatype MPI_GetType<long double>(void) { return MPI_LONG_DOUBLE ;} 34 35 9 36 } 10 37 #endif
Note: See TracChangeset
for help on using the changeset viewer.