File indexing completed on 2025-01-18 09:12:16
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #include <cuda_runtime.h>
0011
0012
0013 #include <iostream>
0014 #include <sstream>
0015 #include <stdexcept>
0016
0017 namespace Acts {
0018 namespace Cuda {
0019 namespace Details {
0020
0021 void throwError(cudaError_t errorCode, const char* expression, const char* file,
0022 int line) {
0023
0024 std::ostringstream errorMsg;
0025 errorMsg << file << ":" << line << " Failed to execute: " << expression
0026 << " (" << cudaGetErrorString(errorCode) << ")";
0027
0028 std::cerr << errorMsg.str() << std::endl;
0029 throw std::runtime_error(errorMsg.str());
0030 }
0031
0032 }
0033 }
0034 }