ATLAS Offline Software
Loading...
Searching...
No Matches
Stream.cxx File Reference
#include "Stream.h"
#include "CxxUtils/checker_macros.h"
#include <format>
#include <stdexcept>
Include dependency graph for AthHIP/AthHIPComps/src/Stream.cxx:

Go to the source code of this file.

Namespaces

namespace  AthHIP
namespace  AthHIP::Details

Macros

#define HIP_ERROR_CHECK(EXP)
 Helper macro used for checking hipError_t type return values.

Macro Definition Documentation

◆ HIP_ERROR_CHECK

#define HIP_ERROR_CHECK ( EXP)
Value:
do { \
hipError_t errorCode = EXP; \
if (errorCode != hipSuccess) { \
throw std::runtime_error(std::format("{}:{} Failed to execute: {} ({})", \
__FILE__, __LINE__, #EXP, \
hipGetErrorString(errorCode))); \
} \
} while (false)

Helper macro used for checking hipError_t type return values.

Definition at line 16 of file AthHIP/AthHIPComps/src/Stream.cxx.

16#define HIP_ERROR_CHECK(EXP) \
17 do { \
18 hipError_t errorCode = EXP; \
19 if (errorCode != hipSuccess) { \
20 throw std::runtime_error(std::format("{}:{} Failed to execute: {} ({})", \
21 __FILE__, __LINE__, #EXP, \
22 hipGetErrorString(errorCode))); \
23 } \
24 } while (false)