Add type traits
This commit is contained in:
parent
b1175997af
commit
8c39827061
12
atrip.org
12
atrip.org
@ -8,7 +8,6 @@ The algorithm uses two main data types, the =Slice= and the
|
|||||||
|
|
||||||
** The slice
|
** The slice
|
||||||
|
|
||||||
|
|
||||||
#+begin_src c++ :tangle (atrip-slice-h)
|
#+begin_src c++ :tangle (atrip-slice-h)
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -18,9 +17,20 @@ The algorithm uses two main data types, the =Slice= and the
|
|||||||
|
|
||||||
#include <atrip/Tuples.hpp>
|
#include <atrip/Tuples.hpp>
|
||||||
#include <atrip/Utils.hpp>
|
#include <atrip/Utils.hpp>
|
||||||
|
#include <atrip/Blas.hpp>
|
||||||
|
|
||||||
namespace atrip {
|
namespace atrip {
|
||||||
|
|
||||||
|
namespace traits {
|
||||||
|
template <typename FF> bool isComplex() { return false; };
|
||||||
|
template <> bool isComplex<Complex>() { return true; };
|
||||||
|
namespace mpi {
|
||||||
|
template <typename FF> MPI_Datatype datatypeOf(void);
|
||||||
|
template <> MPI_Datatype datatypeOf<double>() { return MPI_DOUBLE; }
|
||||||
|
template <> MPI_Datatype datatypeOf<Complex>() { return MPI_DOUBLE_COMPLEX; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
struct Slice {
|
struct Slice {
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user