Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:12

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2021-2025 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 #pragma once
0009 
0010 // HIP include(s).
0011 #include <hip/hip_runtime_api.h>
0012 
0013 /// Helper macro used for checking @c hipError_t type return values.
0014 #define TRACCC_HIP_ERROR_CHECK(EXP)                                           \
0015   do {                                                                        \
0016     hipError_t errorCode = EXP;                                               \
0017     if (errorCode != hipSuccess) {                                            \
0018       traccc::hip::details::throw_error(errorCode, #EXP, __FILE__, __LINE__); \
0019     }                                                                         \
0020   } while (false)
0021 
0022 namespace traccc::hip::details {
0023 
0024 /// Function used to print and throw a user-readable error if something breaks
0025 void throw_error(hipError_t errorCode, const char* expression, const char* file,
0026                  int line);
0027 
0028 }  // namespace traccc::hip::details