File indexing completed on 2026-07-26 08:22:11
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include "cuda_error_handling.hpp"
0010
0011
0012 #include <iostream>
0013 #include <sstream>
0014 #include <stdexcept>
0015
0016 namespace traccc::cuda_utils::details {
0017
0018 void throw_error(cudaError_t errorCode, const char* expression,
0019 const char* file, int line) {
0020
0021 std::ostringstream errorMsg;
0022 errorMsg << file << ":" << line << " Failed to execute: " << expression
0023 << " (" << cudaGetErrorString(errorCode) << ")";
0024
0025
0026 throw std::runtime_error(errorMsg.str());
0027 }
0028
0029 }