60 lines · plain
1//===----------------------------------------------------------------------===//2//3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.4// See https://llvm.org/LICENSE.txt for license information.5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// This file contains the declaration of the macros defining attributes for11/// exported methods and defining API namespaces.12///13//===----------------------------------------------------------------------===//14 15#ifndef _LIBSYCL___IMPL_DETAIL_CONFIG_HPP16#define _LIBSYCL___IMPL_DETAIL_CONFIG_HPP17 18#include <sycl/__impl/version.hpp>19 20#define _LIBSYCL_BEGIN_UNVERSIONED_NAMESPACE_SYCL namespace sycl {21#define _LIBSYCL_END_UNVERSIONED_NAMESPACE_SYCL }22 23#define _LIBSYCL_BEGIN_NAMESPACE_SYCL \24 _LIBSYCL_BEGIN_UNVERSIONED_NAMESPACE_SYCL inline namespace _LIBSYCL_ABI_NAMESPACE {25#define _LIBSYCL_END_NAMESPACE_SYCL \26 } \27 _LIBSYCL_END_UNVERSIONED_NAMESPACE_SYCL28 29#ifndef __SYCL_DEVICE_ONLY__30 31# ifndef _LIBSYCL_EXPORT32# ifdef _WIN3233 34# define _LIBSYCL_DLL_LOCAL35 36# ifdef _LIBSYCL_BUILDING_LIBRARY37# define _LIBSYCL_EXPORT __declspec(dllexport)38# else39# define _LIBSYCL_EXPORT __declspec(dllimport)40# endif //_LIBSYCL_BUILDING_LIBRARY41 42# else // _WIN3243 44# define _LIBSYCL_DLL_LOCAL [[__gnu__::__visibility__("hidden")]]45# define _LIBSYCL_EXPORT [[__gnu__::__visibility__("default")]]46 47# endif // _WIN3248# endif // _LIBSYCL_EXPORT49 50#else // __SYCL_DEVICE_ONLY__51 52# ifndef _LIBSYCL_EXPORT53# define _LIBSYCL_EXPORT54# define _LIBSYCL_DLL_LOCAL55# endif56 57#endif // __SYCL_DEVICE_ONLY__58 59#endif // _LIBSYCL___IMPL_DETAIL_CONFIG_HPP60