1#ifndef PSPG_GPU_TYPES_H
2#define PSPG_GPU_TYPES_H
12#define DOUBLE_PRECISION
14#ifdef SINGLE_PRECISION
15typedef cufftReal cudaReal;
16typedef cufftComplex cudaComplex;
17typedef cufftReal hostReal;
18typedef cufftComplex hostComplex;
20#ifdef DOUBLE_PRECISION
21typedef cufftDoubleReal cudaReal;
22typedef cufftDoubleComplex cudaComplex;
23typedef cufftDoubleReal hostReal;
24typedef cufftDoubleComplex hostComplex;
28#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__);}
29inline void gpuAssert(cudaError_t code,
const char *file,
int line,
bool abort=
true)
31 if (code != cudaSuccess)
33 fprintf(stderr,
"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line);
C++ namespace for polymer self-consistent field theory (PSCF).