Skip to content

[SYCL] Use correct macro name in export.hpp #1527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions sycl/include/CL/sycl/detail/export.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#pragma once

#ifndef SYCL_DEVICE_ONLY
#ifndef __SYCL_DEVICE_ONLY__
#ifndef __SYCL_EXPORT
#ifdef _WIN32

Expand All @@ -25,14 +25,19 @@
#else
#define __SYCL_EXPORT __declspec(dllimport)
#define __SYCL_EXPORT_DEPRECATED(x) __declspec(dllimport, deprecated(x))
#endif
#else
#endif //__SYCL_BUILD_SYCL_DLL
#else // _WIN32

#define DLL_LOCAL __attribute__((visibility("hidden")))

#define __SYCL_EXPORT __attribute__((visibility("default")))
#define __SYCL_EXPORT_DEPRECATED(x) \
__attribute__((visibility("default"), deprecated(x)))
#endif // _WIN32
#endif // __SYCL_EXPORT
#else
#ifndef __SYCL_EXPORT
#define __SYCL_EXPORT
#define __SYCL_EXPORT_DEPRECATED(x)
#endif
#endif
#endif
#endif // __SYCL_DEVICE_ONLY__
2 changes: 1 addition & 1 deletion sycl/include/CL/sycl/detail/image_ocl_types.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ struct opencl_image_type;

// Creation of dummy ocl types for host_image targets.
// These dummy ocl types are needed by the compiler parser for the compilation
// of host application code with SYCL_DEVICE_ONLY macro set.
// of host application code with __SYCL_DEVICE_ONLY__ macro set.
template <int Dimensions, access::mode AccessMode>
struct opencl_image_type<Dimensions, AccessMode, access::target::host_image> {
using type =
Expand Down