Viskores  1.0
Classes | Namespaces | Macros
ErrorCuda.h File Reference
#include <viskores/Types.h>
#include <viskores/cont/Error.h>
#include <cuda.h>
#include <sstream>

Go to the source code of this file.

Classes

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

Namespaces

 viskores
 Groups connected points that have the same field value.
 
 viskores::cont
 Viskores Control Environment.
 
 viskores::cont::cuda
 CUDA implementation for Control Environment.
 

Macros

#define VISKORES_CUDA_CHECK_ASYNCHRONOUS_ERROR()
 A macro that can be used to check to see if there are any unchecked CUDA errors. More...
 
#define VISKORES_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

◆ 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.

VISKORES_SWALLOW_SEMICOLON_PRE_BLOCK
#define VISKORES_SWALLOW_SEMICOLON_PRE_BLOCK
Definition: Configure.h:360
VISKORES_CUDA_CHECK_ASYNCHRONOUS_ERROR
#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