valib
Vortex Analysis LIBrary
common_defs.h
1
5
#ifndef VA_COMMON_DEFS_H
6
#define VA_COMMON_DEFS_H
7
8
// use 64-bit representation of real numbers
9
#define VA_REAL double
10
// use 32-bit representation of real numbers
11
//#define VA_REAL float
12
13
#define VA_PI 3.14159265358979323846
14
15
#if defined(CUDA)
16
#define VA_DEVICE_ADDR
17
#define VA_DEVICE_FUN __device__
18
#define fabs fabsf
19
#define sqrt sqrtf
20
#define pow powf
21
#elif defined(OPENCL)
22
#define VA_DEVICE_ADDR __global
23
#define VA_DEVICE_FUN
24
#define sqrt native_sqrt
25
#define sin native_sin
26
#define cos native_cos
27
#else
28
#include <math.h>
29
#include <stdlib.h>
30
#include <stdio.h>
31
#include <complex.h>
32
#define VA_DEVICE_ADDR
33
#define VA_DEVICE_FUN
34
#endif
35
36
#endif // VA_COMMON_DEFS_H
include
common_defs.h
Generated by
1.8.17