PSCF v1.2
cuda/types.h
1#ifndef PRDC_CUDA_TYPES_H
2#define PRDC_CUDA_TYPES_H
3
4#include <cufft.h>
5
6// Toggle single / double precision:
7// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8//#define SINGLE_PRECISION
9#define DOUBLE_PRECISION
10
11namespace Pscf {
12namespace Prdc {
13namespace Cuda {
14
18 #ifdef SINGLE_PRECISION
19 typedef cufftComplex Complex;
20 typedef cufftComplex cudaComplex;
21 #else
22 #ifdef DOUBLE_PRECISION
23 typedef cufftDoubleComplex Complex;
24 typedef cufftDoubleComplex cudaComplex;
25 #endif
26 #endif
27
31 #ifdef SINGLE_PRECISION
32 typedef cufftReal Real;
33 typedef cufftReal cudaReal;
34 #else
35 #ifdef DOUBLE_PRECISION
36 typedef cufftDoubleReal Real;
37 typedef cufftDoubleReal cudaReal;
38 #endif
39 #endif
40
41} // Cuda
42} // Prdc
43} // Pscf
44#endif
double Real
Real number type used in CPU code that uses FFTW.
Definition cpu/types.h:25
fftw_complex Complex
Complex number type used in CPU code that uses FFTW.
Definition cpu/types.h:20
PSCF package top-level namespace.
Definition param_pc.dox:1