/home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/core/hip_assert.h Source File# 1 min read time Applies to Linux rocCV: /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-roccv/checkouts/latest/include/core/hip_assert.h Source File includecore hip_assert.h Go to the documentation of this file. 1 22 #pragma once 23 24 #include <hip/hip_runtime.h> 25 26 #include "core/exception.hpp" 27 28 #define HIP_ASSERT(x) (assert((x) == hipSuccess)) 29 30 #define HIP_VALIDATE_NO_ERRORS(x) \ 31 { \ 32 hipError_t status = x; \ 33 if (status != hipSuccess) { \ 34 char msg[100]; \ 35 snprintf(msg, 100, "Internal HIP Error: %s", hipGetErrorName(status)); \ 36 throw roccv::Exception(msg, roccv::eStatusType::INTERNAL_ERROR); \ 37 } \ 38 } 39 40 #define assertm(exp, msg) assert(((void)msg, exp)) exception.hpp