Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Implement MPI_Aint_add and MPI_Aint_diff
[simgrid.git] / include / smpi / smpi.h
index 8832ecd..f39fed4 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. */
@@ -309,7 +309,7 @@ XBT_PUBLIC_DATA const MPI_Datatype MPI_COUNT;
 #define MPI_LOGICAL MPI_LONG
 #endif
 
-#define MPI_Fint int
+typedef int MPI_Fint;
 
 #define MPI_COMPLEX MPI_C_FLOAT_COMPLEX
 #define MPI_DOUBLE_COMPLEX MPI_C_DOUBLE_COMPLEX
@@ -459,6 +459,8 @@ MPI_CALL(XBT_PUBLIC int, MPI_Buffer_attach, (void* buffer, int size));
 MPI_CALL(XBT_PUBLIC int, MPI_Buffer_detach, (void* buffer, int* size));
 MPI_CALL(XBT_PUBLIC int, MPI_Address, (const void* location, MPI_Aint* address));
 MPI_CALL(XBT_PUBLIC int, MPI_Get_address, (const void* location, MPI_Aint* address));
+MPI_CALL(XBT_PUBLIC MPI_Aint, MPI_Aint_diff, (MPI_Aint base, MPI_Aint disp));
+MPI_CALL(XBT_PUBLIC MPI_Aint, MPI_Aint_add, (MPI_Aint base, MPI_Aint disp));
 MPI_CALL(XBT_PUBLIC int, MPI_Error_class, (int errorcode, int* errorclass));
 MPI_CALL(XBT_PUBLIC int, MPI_Error_string, (int errorcode, char* string, int* resultlen));
 
@@ -473,7 +475,9 @@ MPI_CALL(XBT_PUBLIC int, MPI_Type_free, (MPI_Datatype * datatype));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_size, (MPI_Datatype datatype, int* size));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_size_x, (MPI_Datatype datatype, MPI_Count* size));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_get_extent, (MPI_Datatype datatype, MPI_Aint* lb, MPI_Aint* extent));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_extent_x, (MPI_Datatype datatype, MPI_Count* lb, MPI_Count* extent));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_get_true_extent, (MPI_Datatype datatype, MPI_Aint* lb, MPI_Aint* extent));
+MPI_CALL(XBT_PUBLIC int, MPI_Type_get_true_extent_x, (MPI_Datatype datatype, MPI_Count* lb, MPI_Count* extent));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_extent, (MPI_Datatype datatype, MPI_Aint* extent));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_lb, (MPI_Datatype datatype, MPI_Aint* disp));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_ub, (MPI_Datatype datatype, MPI_Aint* disp));
@@ -786,6 +790,7 @@ MPI_CALL(XBT_PUBLIC int, MPI_Grequest_start,
 MPI_CALL(XBT_PUBLIC int, MPI_Grequest_complete, (MPI_Request request));
 MPI_CALL(XBT_PUBLIC int, MPI_Status_set_cancelled, (MPI_Status * status, int flag));
 MPI_CALL(XBT_PUBLIC int, MPI_Status_set_elements, (MPI_Status * status, MPI_Datatype datatype, int count));
+MPI_CALL(XBT_PUBLIC int, MPI_Status_set_elements_x, (MPI_Status * status, MPI_Datatype datatype, MPI_Count count));
 MPI_CALL(XBT_PUBLIC int, MPI_Type_create_subarray,
          (int ndims, const int* array_of_sizes, const int* array_of_subsizes, const int* array_of_starts, int order, MPI_Datatype oldtype,
           MPI_Datatype* newtype));
@@ -1031,7 +1036,7 @@ XBT_PUBLIC void smpi_trace_set_call_location__(const char* file, const int* line
 #define SMPI_SAMPLE_FLOPS(flops) for(smpi_execute_flops(flops); 0; )
 XBT_PUBLIC void* smpi_shared_malloc(size_t size, const char* file, int line);
 #define SMPI_SHARED_MALLOC(size) smpi_shared_malloc((size), __FILE__, __LINE__)
-XBT_PUBLIC void* smpi_shared_malloc_partial(size_t size, size_t* shared_block_offsets, int nb_shared_blocks);
+XBT_PUBLIC void* smpi_shared_malloc_partial(size_t size, const size_t* shared_block_offsets, int nb_shared_blocks);
 #define SMPI_PARTIAL_SHARED_MALLOC(size, shared_block_offsets, nb_shared_blocks)                                       \
   smpi_shared_malloc_partial((size), (shared_block_offsets), (nb_shared_blocks))