ATLAS Offline Software
Loading...
Searching...
No Matches
AsyncCopyTool.cxx File Reference
#include "AsyncCopyTool.h"
#include <vecmem/utils/cuda/async_copy.hpp>
#include <format>
#include <stdexcept>
Include dependency graph for AsyncCopyTool.cxx:

Go to the source code of this file.

Namespaces

namespace  AthCUDA

Macros

#define CUDA_ERROR_CHECK(EXP)
 Helper macro used for checking cudaError_t type return values.

Macro Definition Documentation

◆ CUDA_ERROR_CHECK

#define CUDA_ERROR_CHECK ( EXP)
Value:
do { \
cudaError_t errorCode = EXP; \
if (errorCode != cudaSuccess) { \
throw std::runtime_error(std::format("{}:{} Failed to execute: {} ({})", \
__FILE__, __LINE__, #EXP, \
cudaGetErrorString(errorCode))); \
} \
} while (false)

Helper macro used for checking cudaError_t type return values.

Definition at line 16 of file AsyncCopyTool.cxx.

16#define CUDA_ERROR_CHECK(EXP) \
17 do { \
18 cudaError_t errorCode = EXP; \
19 if (errorCode != cudaSuccess) { \
20 throw std::runtime_error(std::format("{}:{} Failed to execute: {} ({})", \
21 __FILE__, __LINE__, #EXP, \
22 cudaGetErrorString(errorCode))); \
23 } \
24 } while (false)