Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

src/AppTypes/dcomplex.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://people.web.psi.ch/adelmann/ for more details
00008  *
00009  ***************************************************************************/
00010 
00011 #ifndef DCOMPLEX_H
00012 #define DCOMPLEX_H
00013 
00014 /***********************************************************************
00015  * 
00016  * Work around the lack of draft standard complex<T> in all compilers.
00017  * Correctly declare a dcomplex typedef based on the compiler capabilities
00018  * and available C++ standard library.  dcomplex is a complex number class
00019  * storing values as doubles.
00020  *
00021  ***********************************************************************/
00022 
00023 // include standard complex header file
00024 #ifdef IPPL_USE_STANDARD_HEADERS
00025 #include <complex>
00026 using namespace std;
00027 #else
00028 #include <complex.h>
00029 #endif
00030 
00031 
00032 #ifdef IPPL_HAS_TEMPLATED_COMPLEX
00033 
00034 // KAI and others have a templated complex class
00035 #ifdef IPPL_USE_SINGLE_PRECISION
00036 typedef complex<float> dcomplex;
00037 #else // USE_DOUBLE_PRECISION
00038 typedef complex<double> dcomplex;
00039 #endif
00040 
00041 typedef complex<float> fComplex;
00042 
00043 #else
00044 
00045 // This assumes that all other compilers have the old non-templated
00046 // complex type which is like complex<double> in the draft standard.
00047 typedef complex dcomplex;
00048 
00049 #endif // IPPL_HAS_TEMPLATED_COMPLEX
00050 
00051 #endif // DCOMPLEX_H
00052 
00053 /***************************************************************************
00054  * $RCSfile: dcomplex.h,v $   $Author: adelmann $
00055  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:24 $
00056  * IPPL_VERSION_ID: $Id: dcomplex.h,v 1.1.1.1 2003/01/23 07:40:24 adelmann Exp $ 
00057  ***************************************************************************/

Generated on Fri Nov 2 01:25:54 2007 for IPPL by doxygen 1.3.5