Proteus
Programmable JIT compilation and optimization for C/C++ using LLVM
Main Page
Namespaces
Classes
Files
File List
File Members
Loading...
Searching...
No Matches
include
proteus
UtilsHIP.h
Go to the documentation of this file.
1
//===-- UtilsHIP.h -- Utilities header for HIP --===//
2
//
3
// Part of the Proteus Project, under the Apache License v2.0 with LLVM
4
// Exceptions. See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
//===----------------------------------------------------------------------===//
10
11
#ifndef PROTEUS_UTILS_HIP_H
12
#define PROTEUS_UTILS_HIP_H
13
14
#include <hip/hip_runtime.h>
15
#include <hip/hip_runtime_api.h>
16
#include <hip/hiprtc.h>
17
18
#define proteusHipErrCheck(CALL) \
19
{ \
20
hipError_t err = CALL; \
21
if (err != hipSuccess) { \
22
printf("ERROR @ %s:%d -> %s\n", __FILE__, __LINE__, \
23
hipGetErrorString(err)); \
24
abort(); \
25
} \
26
}
27
28
#define proteusHiprtcErrCheck(CALL) \
29
{ \
30
hiprtcResult err = CALL; \
31
if (err != HIPRTC_SUCCESS) { \
32
printf("ERROR @ %s:%d -> %s\n", __FILE__, __LINE__, \
33
hiprtcGetErrorString(err)); \
34
abort(); \
35
} \
36
}
37
38
#endif
Generated by
1.9.8