9#include <vecmem/utils/cuda/async_copy.hpp>
16#define CUDA_ERROR_CHECK(EXP) \
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))); \
41 m_streams = std::make_unique<const SG::SlotSpecificObj<Stream>>();
44 return StatusCode::SUCCESS;
48 const EventContext& ctx)
const {
51 cudaStream_t stream =
m_streams->get(ctx)->m_stream;
52 assert(stream !=
nullptr);
53 return std::make_shared<const vecmem::cuda::async_copy>(stream);