19#ifndef OPM_GPU_SAFE_CALL_HPP
20#define OPM_GPU_SAFE_CALL_HPP
21#include <cuda_runtime.h>
23#include <opm/common/ErrorMacros.hpp>
24#include <opm/common/OpmLog/OpmLog.hpp>
51 return fmt::format(
"GPU expression did not execute correctly. Expression was: \n"
54 "in function {}, in {}, at line {}\n",
150#define OPM_GPU_SAFE_CALL(expression) \
151 ::Opm::gpuistl::detail::cudaSafeCall(expression, #expression, __FILE__, __func__, __LINE__)
171#define OPM_GPU_WARN_IF_ERROR(expression) \
172 ::Opm::gpuistl::detail::cudaWarnIfError(expression, #expression, __FILE__, __func__, __LINE__)
Contains wrappers to make the CuBLAS library behave as a modern C++ library with function overlading.
Definition autotuner.hpp:29
std::string getCudaErrorMessage(cudaError_t error, const std::string_view &expression, const std::string_view &filename, const std::string_view &functionName, size_t lineNumber)
getCudaErrorMessage generates the error message to display for a given error.
Definition gpu_safe_call.hpp:45
void cudaSafeCall(cudaError_t error, const std::string_view &expression, const std::string_view &filename, const std::string_view &functionName, size_t lineNumber)
cudaSafeCall checks the return type of the GPU expression (function call) and throws an exception if ...
Definition gpu_safe_call.hpp:82
void cudaWarnIfError(cudaError_t error, const std::string_view &expression, const std::string_view &filename, const std::string_view &functionName, size_t lineNumber)
cudaWarnIfError checks the return type of the GPU expression (function call) and issues a warning if ...
Definition gpu_safe_call.hpp:121
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242