cublas_safe_call.hpp File Reference #include <cublas_v2.h> #include <exception> #include <fmt/core.h> #include <opm/common/ErrorMacros.hpp> #include <opm/common/OpmLog/OpmLog.hpp> #include <string_view>
Include dependency graph for cublas_safe_call.hpp:
Go to the source code of this file.
Macro Definition Documentation◆ CHECK_CUBLAS_ERROR_TYPE
Value:
if (code == x) { \
return #x; \
}
◆ OPM_CUBLAS_SAFE_CALL
OPM_CUBLAS_SAFE_CALL checks the return type of the cublas expression (function call) and throws an exception if it does not equal CUBLAS_STATUS_SUCCESS. Example usage: #include <cublas_v2.h>
void some_function() {
cublasHandle_t cublasHandle;
OPM_CUBLAS_SAFE_CALL(cublasCreate(&cublasHandle));
}
#define OPM_CUBLAS_SAFE_CALL(expression) OPM_CUBLAS_SAFE_CALL checks the return type of the cublas expression (function call) and throws an ex... Definition: cublas_safe_call.hpp:196
◆ OPM_CUBLAS_WARN_IF_ERROR
OPM_CUBLAS_WARN_IF_ERROR checks the return type of the cublas expression (function call) and issues a warning if it does not equal CUBLAS_STATUS_SUCCESS. Example usage: #include <cublas_v2.h>
void some_function() {
cublasHandle_t cublasHandle;
OPM_CUBLAS_WARN_IF_ERROR(cublasCreate(&cublasHandle));
}
#define OPM_CUBLAS_WARN_IF_ERROR(expression) OPM_CUBLAS_WARN_IF_ERROR checks the return type of the cublas expression (function call) and issues a... Definition: cublas_safe_call.hpp:216
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||