Skip to content

Commit 2ce5fef

Browse files
[SYCL] Use inline in device definition of _invalid_parameter (#18451)
Header definitions should be `inline` to avoid multiple definitions error. --------- Co-authored-by: aelovikov-intel <[email protected]>
1 parent 372526e commit 2ce5fef

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

sycl/include/sycl/stl_wrappers/corecrt.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@
2727

2828
#if defined(__SYCL_DEVICE_ONLY__) && defined(_DEBUG)
2929

30-
#include <cstdint> // For uintptr_t
31-
#include <sycl/detail/defines_elementary.hpp> // For __DPCPP_SYCL_EXTERNAL
30+
#include <cstdint> // For uintptr_t
3231

33-
extern "C" __DPCPP_SYCL_EXTERNAL void __cdecl _invalid_parameter(
34-
wchar_t const *, wchar_t const *, wchar_t const *, unsigned int,
35-
uintptr_t) {
32+
extern "C" inline void __cdecl _invalid_parameter(wchar_t const *,
33+
wchar_t const *,
34+
wchar_t const *, unsigned int,
35+
uintptr_t) {
3636
// Do nothing when called in device code
3737
}
3838

0 commit comments

Comments
 (0)