pulsatrix
Loading...
Searching...
No Matches
hip_check.hpp
Go to the documentation of this file.
1
8#pragma once
9
10#include <hip/hip_runtime.h>
11
12#include <stdexcept>
13#include <string>
14
28#define PULSATRIX_HIP_CHECK(call) \
29 do { \
30 hipError_t pulsatrix_hip_check_result = (call); \
31 if (pulsatrix_hip_check_result != hipSuccess) { \
32 throw std::runtime_error(std::string("HIP error: ") + \
33 hipGetErrorString(pulsatrix_hip_check_result) + " at " __FILE__ + \
34 ":" + std::to_string(__LINE__)); \
35 } \
36 } while (0)