cuSBF
Loading...
Searching...
No Matches
Classes | Namespaces | Macros
helpers.cuh File Reference
#include <cuda_runtime.h>
#include <cuda/std/bit>
#include <cuda/std/concepts>
#include <cstddef>
#include <cstdint>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Classes

class  cusbf::CudaError
 Exception thrown on CUDA runtime errors. More...
 

Namespaces

namespace  cusbf
 
namespace  cusbf::detail
 

Macros

#define CUSBF_CUDA_CALL(err)
 Macro for checking CUDA errors.
 

Macro Definition Documentation

◆ CUSBF_CUDA_CALL

#define CUSBF_CUDA_CALL (   err)
Value:
do { \
cudaError_t err_ = (err); \
if (err_ == cudaSuccess) [[likely]] { \
break; \
} \
throw cusbf::CudaError(err_, __FILE__, __LINE__); \
} while (0)
Exception thrown on CUDA runtime errors.
Definition helpers.cuh:18

Macro for checking CUDA errors.

Throws cusbf::CudaError on failure.

Definition at line 132 of file helpers.cuh.

133 { \
134 cudaError_t err_ = (err); \
135 if (err_ == cudaSuccess) [[likely]] { \
136 break; \
137 } \
138 throw cusbf::CudaError(err_, __FILE__, __LINE__); \
139 } while (0)