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 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");
Definition: exception.h:19
static cudaStream_t getStream(int id)
Get the stream for the CUDA device with id in ArrayFire context.
Definition: cuda.h:75
The function returned successfully.
Definition: defines.h:67
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:94
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.
af_err
Definition: defines.h:63
static void setNativeId(int nativeId)
Set the CUDA device with given native id as the active device for ArrayFire.
Definition: cuda.h:112
#define AFAPI
Definition: defines.h:31
AFAPI af_err afcu_set_native_id(int nativeid)
Set the CUDA device with given native id as the active device for ArrayFire.