forked from intel/llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevice.h
30 lines (25 loc) · 994 Bytes
/
device.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
//==--- device.h - device definitions ------------------------*- C++ -*-----==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef __LIBDEVICE_DEVICE_H__
#define __LIBDEVICE_DEVICE_H__
#ifdef __cplusplus
#define EXTERN_C extern "C"
#else // __cplusplus
#define EXTERN_C
#endif // __cplusplus
#ifdef __SPIR__
#ifdef __SYCL_DEVICE_ONLY__
#define DEVICE_EXTERNAL SYCL_EXTERNAL __attribute__((weak))
#else // __SYCL_DEVICE_ONLY__
#define DEVICE_EXTERNAL __attribute__((weak))
#endif // __SYCL_DEVICE_ONLY__
#define DEVICE_EXTERN_C DEVICE_EXTERNAL EXTERN_C
#define DEVICE_EXTERN_C_INLINE \
DEVICE_EXTERNAL EXTERN_C __attribute__((always_inline))
#endif // __SPIR__
#endif // __LIBDEVICE_DEVICE_H__