Skip to content
Snippets Groups Projects
Commit a99dc818 authored by Ansgar Burchardt's avatar Ansgar Burchardt Committed by Carsten Gräser
Browse files

[release] MPITraits: Use std::uint16_t for bigunsignedint<k>

The storage of bigunsignedint was changed to std::uint16_t in commit
541b3dfc. This implements the same
change for the MPITraits<bigunsignedint<k>>

Note that this assumes that
  MPITraits<std::uint16_t>
is defined. This is the case as long as uint16_t maps to one of the
standard integer types (unsigned char/short/int/long).

Thanks to Markus for pointing this out.

Reference: https://dune-project.org/flyspray/index.php?do=details&task_id=1657#comment6393


(cherry picked from commit 586375b4)
Signed-off-by: default avatarCarsten Gräser <graeser@dune-project.org>
parent 464976b6
Branches
Tags
1 merge request!2512017-05 merge of upstream repository
......@@ -7,6 +7,7 @@
#include <mpi.h>
#endif
#include <cstdint>
#include <utility>
namespace Dune
......@@ -127,7 +128,7 @@ namespace Dune
static inline MPI_Datatype getType()
{
if(datatype==MPI_DATATYPE_NULL) {
MPI_Type_contiguous(bigunsignedint<k>::n, MPITraits<unsigned short>::getType(),
MPI_Type_contiguous(bigunsignedint<k>::n, MPITraits<std::uint16_t>::getType(),
&vectortype);
//MPI_Type_commit(&vectortype);
bigunsignedint<k> data;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment