24 #if defined(_WIN32) || defined(_MSC_VER)
28 #define AFAPI __declspec(dllexport)
30 #define AFAPI __declspec(dllimport)
32 #ifdef AFXDLL // libafGFX
33 #define AFXAPI __declspec(dllexport)
35 #define AFXAPI __declspec(dllimport)
39 #define bool unsigned char
43 #define __PRETTY_FUNCTION__ __FUNCSIG__
45 #define AFAPI __attribute__((visibility("default")))
46 #define AFXAPI __attribute__((visibility("default")))
50 #if defined(_WIN32) || defined(_WIN64)
104 #include <cuda_runtime_api.h>
105 #include <cuComplex.h>
106 #include <cusparse_v2.h>
111 #if CUDA_VERSION != 6000
112 #error "this version of ArrayFire requires CUDA v6.0 toolkit and driver"
121 typedef cl_float2 float2;
122 typedef cl_double2 double2;
126 unsigned int x, y, z;
127 #if defined(__cplusplus)
128 dim3(
unsigned int vx = 1,
unsigned int vy = 1,
unsigned int vz = 1) : x(vx), y(vy), z(vz) {}
132 typedef struct dim3 dim3;
bool af_can_compute_dbl(int dev)
Returns true if the device is capabale of doing double precision computation.
afError af_malloc(void **ptr, size_t bytes)
Allocate memory on the device.
af_matprop_t
Definition: defines.h:4
External library failure (FFT, BLAS, LAPACK,..)
Definition: defines.h:19
afError af_garbage(size_t bytes)
afError af_errno(void)
Fetch last error code.
Undocumented internal error.
Definition: defines.h:12
afError
Definition: defines.h:10
cuDoubleComplex cdouble
Definition: defines.h:109
License error.
Definition: defines.h:20
Batch mode not supported.
Definition: defines.h:14
Invalid argument.
Definition: defines.h:15
afError(* af_garbage_fn)(size_t bytes)
Definition: defines.h:81
Out of memory.
Definition: defines.h:13
afError(* af_alloc_fn)(void **, size_t bytes)
Memory handling function callback prototypes.
Definition: defines.h:79
conjugate transpose
Definition: defines.h:6
Operation unsupported.
Definition: defines.h:16
#define AFAPI
Definition: defines.h:45
afError(* af_free_fn)(const void *)
Definition: defines.h:80
CUDA Driver error.
Definition: defines.h:17
afError af_init(af_alloc_fn alloc, af_free_fn free, af_garbage_fn garbage)
Initialize runtime to use these provided callbacks for memory management.
CUDA Runtime error.
Definition: defines.h:18
afError af_free(const void *ptr)
Free memory on the device.
cuFloatComplex cfloat
Definition: defines.h:108
transpose
Definition: defines.h:7
Default.
Definition: defines.h:5
No error.
Definition: defines.h:11
const char * af_errstr(void)
Fetch the last error message, typically indicating file/line where error originated.
System Configuration problem.
Definition: defines.h:21