vecmem
1.21.0
Loading...
Searching...
No Matches
hip
src
utils
hip_error_handling.hpp
1
/* VecMem project, part of the ACTS project (R&D line)
2
*
3
* (c) 2021-2025 CERN for the benefit of the ACTS project
4
*
5
* Mozilla Public License Version 2.0
6
*/
7
#pragma once
8
9
// HIP include(s).
10
#include <hip/hip_runtime_api.h>
11
13
#define VECMEM_HIP_ERROR_CHECK(EXP) \
14
do { \
15
hipError_t errorCode = EXP; \
16
if (errorCode != hipSuccess) { \
17
vecmem::hip::details::throw_error(errorCode, #EXP, __FILE__, \
18
__LINE__); \
19
} \
20
} while (false)
21
24
#define VECMEM_HIP_ERROR_IGNORE(EXP) \
25
do { \
26
(void)EXP; \
27
} while (false)
28
29
namespace
vecmem
{
30
namespace
hip {
31
namespace
details {
32
34
[[noreturn]]
void
throw_error
(hipError_t errorCode,
const
char
* expression,
35
const
char
* file,
int
line);
36
37
}
// namespace details
38
}
// namespace hip
39
}
// namespace vecmem
vecmem::hip::details::throw_error
void throw_error(hipError_t errorCode, const char *expression, const char *file, int line)
Function used to print and throw a user-readable error if something breaks.
Definition
hip_error_handling.cpp:26
vecmem
Main namespace for the vecmem classes/functions.
Definition
atomic_ref.hpp:16
Generated by
1.9.8