Skip to content

Commit d8ec8b5

Browse files
authored
[SYCL] Align OpenCL interop API forward declarations with definitions (#1929)
This fixes compilation failure for windows, which resulted in error C2375: 'cl::sycl::opencl::make_platform': redefinition; different linkage. Signed-off-by: Sergey Kanaev <[email protected]>
1 parent 07e8d8f commit d8ec8b5

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

sycl/include/CL/sycl/backend/opencl.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,13 @@ namespace opencl {
5050
// Note that they take opaque pi_native_handle that real OpenCL handles
5151
// are casted to.
5252
//
53-
platform make_platform(pi_native_handle NativeHandle);
54-
device make_device(pi_native_handle NativeHandle);
55-
context make_context(pi_native_handle NativeHandle);
56-
program make_program(const context &Context, pi_native_handle NativeHandle);
57-
queue make_queue(const context &Context, pi_native_handle InteropHandle);
53+
__SYCL_EXPORT platform make_platform(pi_native_handle NativeHandle);
54+
__SYCL_EXPORT device make_device(pi_native_handle NativeHandle);
55+
__SYCL_EXPORT context make_context(pi_native_handle NativeHandle);
56+
__SYCL_EXPORT program make_program(const context &Context,
57+
pi_native_handle NativeHandle);
58+
__SYCL_EXPORT queue make_queue(const context &Context,
59+
pi_native_handle InteropHandle);
5860

5961
// Construction of SYCL platform.
6062
template <typename T, typename std::enable_if<

0 commit comments

Comments
 (0)