su2hmc
Loading...
Searching...
No Matches
thrust_complex.h
1/*
2 * @file thrust_complex.h
3 *
4 * @brief Complex Header for CUDA. Sets macros for C compatability
5 *
6 * We are also adding dding the macros for extracting the real, imaginary parts.
7 * This way they match the C standard library calles
8 */
9#ifndef TCMPLX
10#define TCMPLX
11#include <thrust/complex.h>
12using thrust::complex;
13//#undef complex
15#define Complex_f complex<float>
17#define Complex complex<double>
18
19
21#define cexp(z) thrust::exp(z)
23#define cimag(z) z.imag()
25#define creal(z) z.real()
27#define conj(z) thrust::conj(z)
29#define I Complex(0.0,1.0)
30#define I_f Complex_f(0.0,1.0f)
31#endif