OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
dcomplex.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 DCOMPLEX_H
12 #define DCOMPLEX_H
13 
14 /***********************************************************************
15  *
16  * Work around the lack of draft standard complex<T> in all compilers.
17  * Correctly declare a dcomplex typedef based on the compiler capabilities
18  * and available C++ standard library. dcomplex is a complex number class
19  * storing values as doubles.
20  *
21  ***********************************************************************/
22 
23 // include standard complex header file
24 #include <complex>
25 
26 // KAI and others have a templated complex class
27 #ifdef IPPL_USE_SINGLE_PRECISION
28 typedef std::complex<float> dcomplex;
29 #else // USE_DOUBLE_PRECISION
30 typedef std::complex<double> dcomplex;
31 #endif
32 
33 #endif // DCOMPLEX_H
std::complex< double > dcomplex
Definition: dcomplex.h:30