Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Sonar wants one declaration per line.
[simgrid.git] / src / smpi / bindings / smpi_pmpi_type.cpp
index 8bf129a..5aa26ad 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2020. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2007-2021. The SimGrid Team. All rights reserved.          */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -46,11 +46,28 @@ int PMPI_Type_get_extent(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent
   return datatype->extent(lb, extent);
 }
 
+int PMPI_Type_get_extent_x(MPI_Datatype datatype, MPI_Count * lb, MPI_Count * extent)
+{
+  MPI_Aint tmplb;
+  MPI_Aint tmpext;
+  int ret = PMPI_Type_get_extent(datatype, &tmplb, &tmpext);
+  if(ret == MPI_SUCCESS){
+    *lb = static_cast<MPI_Count>(tmplb);
+    *extent = static_cast<MPI_Count>(tmpext);
+  }
+  return ret;
+}
+
 int PMPI_Type_get_true_extent(MPI_Datatype datatype, MPI_Aint * lb, MPI_Aint * extent)
 {
   return PMPI_Type_get_extent(datatype, lb, extent);
 }
 
+int PMPI_Type_get_true_extent_x(MPI_Datatype datatype, MPI_Count * lb, MPI_Count * extent)
+{
+  return PMPI_Type_get_extent_x(datatype, lb, extent);
+}
+
 int PMPI_Type_extent(MPI_Datatype datatype, MPI_Aint * extent)
 {
   CHECK_MPI_NULL(1, MPI_DATATYPE_NULL, MPI_ERR_TYPE, datatype)