pulsatrix
Loading...
Searching...
No Matches
cublas_check.hpp
Go to the documentation of this file.
1
7#pragma once
8
9#include <cublas_v2.h>
10
11#include <stdexcept>
12#include <string>
13
18#define PULSATRIX_CUBLAS_CHECK(call) \
19 do { \
20 cublasStatus_t pulsatrix_cublas_check_result = (call); \
21 if (pulsatrix_cublas_check_result != CUBLAS_STATUS_SUCCESS) { \
22 throw std::runtime_error(std::string("cuBLAS error: ") + \
23 cublasGetStatusString(pulsatrix_cublas_check_result) + " at " __FILE__ \
24 + ":" + std::to_string(__LINE__)); \
25 } \
26 } while (0)