OPAL (Object Oriented Parallel Accelerator Library)
2022.1
OPAL
src
ippl
src
AppTypes
AppTypeTraits.h
Go to the documentation of this file.
1
// -*- C++ -*-
2
/***************************************************************************
3
*
4
* The IPPL Framework
5
*
6
*
7
* Visit http://people.web.psi.ch/adelmann/ for more details
8
*
9
***************************************************************************/
10
11
#ifndef APPTYPE_TRAITS_H
12
#define APPTYPE_TRAITS_H
13
14
15
16
// templated traits struct for general IPPL AppType
17
template
<
class
T>
18
struct
AppTypeTraits
{
19
typedef
typename
T::Element_t
Element_t
;
20
enum
{
ElemDim
= T::ElemDim };
21
};
22
23
// specialized versions for built-in types
24
#define BUILTIN_APPTYPE_TRAITS(T) \
25
template <> \
26
struct AppTypeTraits< T > { \
27
typedef T Element_t; \
28
enum { ElemDim = 0 }; \
29
};
30
31
BUILTIN_APPTYPE_TRAITS
(
bool
)
32
BUILTIN_APPTYPE_TRAITS
(
char
)
33
BUILTIN_APPTYPE_TRAITS
(
unsigned
char
)
34
BUILTIN_APPTYPE_TRAITS
(
short
)
35
BUILTIN_APPTYPE_TRAITS
(
unsigned
short
)
36
BUILTIN_APPTYPE_TRAITS
(
int
)
37
BUILTIN_APPTYPE_TRAITS
(
unsigned
int
)
38
BUILTIN_APPTYPE_TRAITS
(
long
)
39
BUILTIN_APPTYPE_TRAITS
(
unsigned
long
)
40
BUILTIN_APPTYPE_TRAITS
(
long
long
)
41
BUILTIN_APPTYPE_TRAITS
(
float
)
42
BUILTIN_APPTYPE_TRAITS
(
double
)
43
BUILTIN_APPTYPE_TRAITS
(
long
double
)
44
BUILTIN_APPTYPE_TRAITS
(
std
::
complex
<
float
>)
45
BUILTIN_APPTYPE_TRAITS
(
std
::
complex
<
double
>)
46
47
#undef BUILTIN_APPTYPE_TRAITS
48
49
#endif
// APPTYPE_TRAITS_H
50
51
/***************************************************************************
52
* $RCSfile: AppTypeTraits.h,v $ $Author: adelmann $
53
* $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:24 $
54
* IPPL_VERSION_ID: $Id: AppTypeTraits.h,v 1.1.1.1 2003/01/23 07:40:24 adelmann Exp $
55
***************************************************************************/
56
BUILTIN_APPTYPE_TRAITS
#define BUILTIN_APPTYPE_TRAITS(T)
Definition:
AppTypeTraits.h:24
interpolation::complex
MMatrix< m_complex > complex(MMatrix< double > real)
Definition:
MMatrix.cpp:396
std
Definition:
LossDataSink.h:64
AppTypeTraits
Definition:
AppTypeTraits.h:18
AppTypeTraits::Element_t
T::Element_t Element_t
Definition:
AppTypeTraits.h:19
AppTypeTraits::ElemDim
@ ElemDim
Definition:
AppTypeTraits.h:20
Generated on Thu Oct 20 2022 17:40:07 for OPAL (Object Oriented Parallel Accelerator Library) by
1.9.3