VTK-m  2.0
Classes | Namespaces | Macros
ErrorCuda.h File Reference
#include <vtkm/Types.h>
#include <vtkm/cont/Error.h>
#include <cuda.h>
#include <sstream>

Go to the source code of this file.

Classes

class  vtkm::cont::cuda::ErrorCuda
 This error is thrown whenever an unidentified CUDA runtime error is encountered. More...
 

Namespaces

 vtkm
 Groups connected points that have the same field value.
 
 vtkm::cont
 VTK-m Control Environment.
 
 vtkm::cont::cuda
 CUDA implementation for Control Environment.
 

Macros

#define VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR()
 A macro that can be used to check to see if there are any unchecked CUDA errors. More...
 
#define VTKM_CUDA_CALL(command)
 A macro that can be wrapped around a CUDA command and will throw an ErrorCuda exception if the CUDA command fails. More...
 

Macro Definition Documentation

◆ VTKM_CUDA_CALL

#define VTKM_CUDA_CALL (   command)
Value:
VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \
{ \
const cudaError_t vtkm_cuda_call_error = command; \
if (vtkm_cuda_call_error != cudaSuccess) \
{ \
throw ::vtkm::cont::cuda::ErrorCuda(vtkm_cuda_call_error, __FILE__, __LINE__, #command); \
} \
} \
VTKM_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.

◆ VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR

#define VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR ( )
Value:
VTKM_SWALLOW_SEMICOLON_PRE_BLOCK \
{ \
const cudaError_t vtkm_cuda_check_async_error = cudaGetLastError(); \
if (vtkm_cuda_check_async_error != cudaSuccess) \
{ \
throw ::vtkm::cont::cuda::ErrorCuda( \
vtkm_cuda_check_async_error, __FILE__, __LINE__, "Unchecked asynchronous error"); \
} \
} \
VTKM_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.

VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR
#define VTKM_CUDA_CHECK_ASYNCHRONOUS_ERROR()
A macro that can be used to check to see if there are any unchecked CUDA errors.
Definition: ErrorCuda.h:23