31 template<
class T>
class iScalar;
32 template<
class T,
int N>
class iVector;
33 template<
class T,
int N>
class iMatrix;
36 template<
typename T>
struct isGridTensor :
public std::false_type {
static constexpr bool notvalue =
true; };
45 template<
typename T>
struct isGridScalar :
public std::false_type {
static constexpr bool notvalue =
true; };
85 static constexpr int Rank = 0;
86 static constexpr std::size_t
count = 1;
87 static constexpr int Dimension(
int dim) {
return 0; }
149#if defined(GRID_CUDA) || defined(GRID_HIP)
152 typedef std::complex<double> scalar_typeD;
154 typedef scalar_typeD vector_typeD;
157 typedef scalar_typeD scalar_objectD;
160 typedef scalar_typeD DoublePrecision;
161 typedef scalar_typeD DoublePrecision2;
164 typedef std::complex<double> scalar_type;
165 typedef std::complex<double> scalar_typeD;
166 typedef scalar_type vector_type;
167 typedef scalar_typeD vector_typeD;
168 typedef scalar_type tensor_reduced;
169 typedef scalar_type scalar_object;
170 typedef scalar_typeD scalar_objectD;
171 typedef scalar_type Complexified;
172 typedef RealD Realified;
173 typedef scalar_typeD DoublePrecision;
174 typedef scalar_typeD DoublePrecision2;
312#define GridTypeMapper_RepeatedTypes \
313 using BaseTraits = GridTypeMapper<T>; \
314 using scalar_type = typename BaseTraits::scalar_type; \
315 using vector_type = typename BaseTraits::vector_type; \
316 using scalar_typeD = typename BaseTraits::scalar_typeD; \
317 using vector_typeD = typename BaseTraits::vector_typeD; \
318 static constexpr int TensorLevel = BaseTraits::TensorLevel + 1
329 static constexpr int Rank = BaseTraits::Rank + 1;
330 static constexpr std::size_t
count = BaseTraits::count;
332 return ( dim == 0 ) ? 1 : BaseTraits::Dimension(dim - 1); }
344 static constexpr int Rank = BaseTraits::Rank + 1;
345 static constexpr std::size_t
count = BaseTraits::count * N;
347 return ( dim == 0 ) ? N : BaseTraits::Dimension(dim - 1); }
359 static constexpr int Rank = BaseTraits::Rank + 2;
360 static constexpr std::size_t
count = BaseTraits::count * N * N;
362 return ( dim == 0 || dim == 1 ) ? N : BaseTraits::Dimension(dim - 2); }
367 static const bool value = (Level==T::TensorLevel);
368 static const bool notvalue = (Level!=T::TensorLevel);
390 typename GridTypeMapper<typename getVectorType<U>::type>::scalar_type,
391 typename GridTypeMapper<typename getVectorType<U>::type>::vector_type>::value, void>
::type>
392 :
public std::true_type {};
Grid_simd2< complex< double >, vComplexD > vComplexD2
Grid_simd2< double, vRealD > vRealD2
Grid_simd< complex< float >, SIMD_Ftype > vComplexF
Grid_simd< uint16_t, SIMD_Htype > vRealH
Grid_simd< complex< uint16_t >, SIMD_Htype > vComplexH
Grid_simd< float, SIMD_Ftype > vRealF
Grid_simd< complex< double >, SIMD_Dtype > vComplexD
Grid_simd< Integer, SIMD_Itype > vInteger
Grid_simd< double, SIMD_Dtype > vRealD
#define NAMESPACE_BEGIN(A)
std::complex< T > complex
std::complex< RealF > ComplexF
std::complex< RealD > ComplexD
Invoke< std::enable_if<!isGridTensor< T >::value, int > > IfNotGridTensor
Invoke< std::enable_if< isGridTensor< T >::value, int > > IfGridTensor
static INTERNAL_PRECISION U
getVectorType< fobj >::type vector_obj
GridTypeMapper< vector_obj >::scalar_type scalar_type
GridTypeMapper< scalar_type >::Realified real_scalar_type
ComplexD DoublePrecision2
ComplexD DoublePrecision2
iMatrix< typename BaseTraits::scalar_object, N > scalar_object
iMatrix< typename BaseTraits::DoublePrecision, N > DoublePrecision
iMatrix< typename BaseTraits::Realified, N > Realified
iMatrix< typename BaseTraits::scalar_objectD, N > scalar_objectD
static constexpr int Dimension(int dim)
static constexpr std::size_t count
iMatrix< typename BaseTraits::DoublePrecision2, N > DoublePrecision2
iMatrix< typename BaseTraits::Complexified, N > Complexified
GridTypeMapper_RepeatedTypes
static constexpr int Rank
iScalar< typename BaseTraits::tensor_reduced > tensor_reduced
iScalar< typename BaseTraits::DoublePrecision > DoublePrecision
iScalar< typename BaseTraits::scalar_object > scalar_object
iScalar< typename BaseTraits::DoublePrecision2 > DoublePrecision2
iScalar< typename BaseTraits::scalar_objectD > scalar_objectD
static constexpr std::size_t count
iScalar< typename BaseTraits::tensor_reduced > tensor_reduced
iScalar< typename BaseTraits::Complexified > Complexified
iScalar< typename BaseTraits::Realified > Realified
static constexpr int Dimension(int dim)
GridTypeMapper_RepeatedTypes
static constexpr int Rank
iVector< typename BaseTraits::Complexified, N > Complexified
iVector< typename BaseTraits::scalar_objectD, N > scalar_objectD
static constexpr int Rank
iVector< typename BaseTraits::DoublePrecision2, N > DoublePrecision2
GridTypeMapper_RepeatedTypes
iScalar< typename BaseTraits::tensor_reduced > tensor_reduced
iVector< typename BaseTraits::scalar_object, N > scalar_object
static constexpr int Dimension(int dim)
iVector< typename BaseTraits::DoublePrecision, N > DoublePrecision
static constexpr std::size_t count
iVector< typename BaseTraits::Realified, N > Realified
vComplexD2 DoublePrecision2
vComplexD2 DoublePrecision
vComplexD2 tensor_reduced
vComplexD DoublePrecision
vComplexD DoublePrecision2
vComplexD2 DoublePrecision2
vComplexD DoublePrecision
vComplexD DoublePrecision2
vComplexD DoublePrecision
static constexpr std::size_t count
static constexpr int Rank
static constexpr int TensorLevel
static constexpr int Dimension(int dim)
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static constexpr bool notvalue
static const bool notvalue