Teuchos: Specialize MpiTypeTraits for std::complex<{float,double}>
Created by: mhoemmen
@trilinos/teuchos @trilinos/tpetra Story: #748 (closed) Blocks: #752 (closed)
Specialize Teuchos::Details::MpiTypeTraits<T>
for T = std::complex<float>
and std::complex<double>
. Some older MPI implementations do not support the built-in MPI_Datatype values MPI_C_FLOAT_COMPLEX
and MPI_C_DOUBLE_COMPLEX
. As a conservative work-around, we assume that these values only exist for MPI_VERSION >= 3
. If MPI_VERSION < 3
, create a derived MPI_Datatype via MPI_Type_Contiguous, and set MpiTypeTraits::needFree = true
.