#include <viskores/Types.h>
#include <viskores/cont/Error.h>
#include <cuda.h>
#include <sstream>
Go to the source code of this file.
◆ VISKORES_CUDA_CALL
#define VISKORES_CUDA_CALL |
( |
|
command | ) |
|
Value:
VISKORES_SWALLOW_SEMICOLON_PRE_BLOCK \
{ \
const cudaError_t viskores_cuda_call_error = command; \
if (viskores_cuda_call_error != cudaSuccess) \
{ \
throw ::viskores::cont::cuda::ErrorCuda( \
viskores_cuda_call_error, __FILE__, __LINE__, #command); \
} \
} \
VISKORES_SWALLOW_SEMICOLON_POST_BLOCK
A macro that can be wrapped around a CUDA command and will throw an ErrorCuda exception if the CUDA command fails.
◆ VISKORES_CUDA_CHECK_ASYNCHRONOUS_ERROR
#define VISKORES_CUDA_CHECK_ASYNCHRONOUS_ERROR |
( |
| ) |
|
Value:
{ \
const cudaError_t viskores_cuda_check_async_error = cudaGetLastError(); \
if (viskores_cuda_check_async_error != cudaSuccess) \
{ \
throw ::viskores::cont::cuda::ErrorCuda( \
viskores_cuda_check_async_error, __FILE__, __LINE__, "Unchecked asynchronous error"); \
} \
} \
VISKORES_SWALLOW_SEMICOLON_POST_BLOCK
A macro that can be used to check to see if there are any unchecked CUDA errors.
Will throw an ErrorCuda if there are.
#define VISKORES_CUDA_CHECK_ASYNCHRONOUS_ERROR()
A macro that can be used to check to see if there are any unchecked CUDA errors.
Definition: ErrorCuda.h:31