Last change
on this file since 1995 was
1984,
checked in by ymipsl, 4 years ago
|
intermediate commit for new tranformation engine?
YM
|
-
Property svn:executable set to
*
|
File size:
821 bytes
|
Rev | Line | |
---|
[1759] | 1 | #ifndef __XIOS_MPI_TOOLS_HPP__ |
---|
[1984] | 2 | #define __XIOS_MPI_TOOLS_HPP__ |
---|
[1759] | 3 | |
---|
| 4 | #include <string> |
---|
| 5 | |
---|
| 6 | namespace xios |
---|
| 7 | { |
---|
| 8 | |
---|
| 9 | int MPI_Bcast_string(std::string& str, int root, MPI_Comm comm) ; |
---|
[1984] | 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 | |
---|
[1759] | 36 | } |
---|
| 37 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.