Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
document cruft
[simgrid.git] / src / smpi / smpi_mpi_dt.cpp
index 9bd0d52..630ca73 100644 (file)
@@ -1,6 +1,5 @@
 /* smpi_mpi_dt.c -- MPI primitives to handle datatypes                      */
-/* Copyright (c) 2009-2015. The SimGrid Team.
- * All rights reserved.                                                     */
+/* Copyright (c) 2009-2017. 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. */
@@ -1403,6 +1402,8 @@ void smpi_op_apply(MPI_Op op, void *invec, void *inoutvec, int *len, MPI_Datatyp
       op->func(invec, inoutvec, len, datatype);
     else{
       int tmp = smpi_type_c2f(*datatype);
+      /* Unfortunately, the C and Fortran version of the MPI standard do not agree on the type here,
+         thus the reinterpret_cast. */
       op->func(invec, inoutvec, len, reinterpret_cast<MPI_Datatype*>(&tmp) );
     }
   }