OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
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
17template <class T>
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) \
25template <> \
26struct AppTypeTraits< T > { \
27 typedef T Element_t; \
28 enum { ElemDim = 0 }; \
29};
30
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
#define BUILTIN_APPTYPE_TRAITS(T)
Definition: AppTypeTraits.h:24
MMatrix< m_complex > complex(MMatrix< double > real)
Definition: MMatrix.cpp:396
T::Element_t Element_t
Definition: AppTypeTraits.h:19