cuComplex.h 606 Bytes
Newer Older
fuhuangpei's avatar
fuhuangpei committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once

#include <hip/hip_complex.h>

using cuFloatComplex = hipFloatComplex;
using cuDoubleComplex = hipDoubleComplex;

#ifndef make_cuFloatComplex
#define make_cuFloatComplex make_hipFloatComplex
#endif

#ifndef make_cuDoubleComplex
#define make_cuDoubleComplex make_hipDoubleComplex
#endif

__host__ __device__ inline float cuCrealf(cuFloatComplex z) { return z.x; }
__host__ __device__ inline float cuCimagf(cuFloatComplex z) { return z.y; }
__host__ __device__ inline double cuCreal(cuDoubleComplex z) { return z.x; }
__host__ __device__ inline double cuCimag(cuDoubleComplex z) { return z.y; }