|
My Project
|
|
Go to the documentation of this file.
13 #include <cuda_runtime.h>
19 #if AF_API_VERSION >= 31
32 #if AF_API_VERSION >= 31
45 #if AF_API_VERSION >= 32
66 #if AF_API_VERSION >= 31
75 static inline cudaStream_t
getStream(
int id)
80 throw af::exception(
"Failed to get CUDA stream from ArrayFire");
85 #if AF_API_VERSION >= 31
99 throw af::exception(
"Failed to get CUDA device native id from ArrayFire");
104 #if AF_API_VERSION >= 32
116 throw af::exception(
"Failed to change active CUDA device to the device with given native id");
static cudaStream_t getStream(int id)
Get the stream for the CUDA device with id in ArrayFire context.
Definition: cuda.h:74
#define AFAPI
Definition: defines.h:30
AFAPI af_err afcu_get_stream(cudaStream_t *stream, int id)
Get the stream for the CUDA device with id in ArrayFire context.
static int getNativeId(int id)
Get the native device id of the CUDA device with id in ArrayFire context.
Definition: cuda.h:93
AFAPI af_err afcu_get_native_id(int *nativeid, int id)
Get the native device id of the CUDA device with id in ArrayFire context.
Definition: exception.h:24
The function returned successfully.
Definition: defines.h:66
static void setNativeId(int nativeId)
Set the CUDA device with given native id as the active device for ArrayFire.
Definition: cuda.h:111
AFAPI af_err afcu_set_native_id(int nativeid)
Set the CUDA device with given native id as the active device for ArrayFire.
af_err
Definition: defines.h:62