Salome HOME
Introducing CMake test for ParaMEDMEM. Making MPI_Access tests
[modules/med.git] / src / ParaMEDMEM / MPIAccess.cxx
index e0a9ea576e8a3eda05da8541aa0122d753368869..b9389cdcc509fd7c54b8bf0d70d96fa46e1df18c 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2015  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -26,8 +26,11 @@ using namespace std;
 
 namespace ParaMEDMEM
 {
-  /*! \defgroup mpi_access MPIAccess
-    Class \a MPIAccess is the gateway to the MPI library.
+  /**!
+    \anchor MPIAccess-det
+    \class MPIAccess
+
+    The class \a MPIAccess is the gateway to the MPI library.
     It is a helper class that gathers the calls to the MPI
     library that are made in the ParaMEDMEM library. This gathering
     allows easier gathering of information about the communication
@@ -1033,6 +1036,30 @@ namespace ParaMEDMEM
       }
   }
 
+  // Returns the MPI size of a TimeMessage
+  MPI_Aint MPIAccess::timeExtent() const
+  {
+    MPI_Aint aextent ;
+    MPI_Type_extent( _MPI_TIME , &aextent ) ;
+    return aextent ;
+  }
+
+  // Returns the MPI size of a MPI_INT
+  MPI_Aint MPIAccess::intExtent() const
+  {
+    MPI_Aint aextent ;
+    MPI_Type_extent( MPI_INT , &aextent ) ;
+    return aextent ;
+  }
+
+  // Returns the MPI size of a MPI_DOUBLE
+  MPI_Aint MPIAccess::doubleExtent() const
+  {
+    MPI_Aint aextent ;
+    MPI_Type_extent( MPI_DOUBLE , &aextent ) ;
+    return aextent ;
+  }
+
   // Outputs fields of a TimeMessage structure
   ostream & operator<< (ostream & f ,const TimeMessage & aTimeMsg )
   {