Skip to content

Commit 9793648

Browse files
Fix compile errors for usage of __throw_domain_error and __throw_runtime_error inside Kernel code in libstdc++ implementation
1 parent 75b6181 commit 9793648

File tree

6 files changed

+97
-0
lines changed

6 files changed

+97
-0
lines changed

test/xpu_api/numerics/special/bessel/bessel_i.pass.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if defined(_GLIBCXX_RELEASE)
10+
#ifdef __SYCL_DEVICE_ONLY__
11+
// Required to define these before all includes
12+
namespace std
13+
{
14+
SYCL_EXTERNAL void __throw_domain_error(const char*)
15+
{
16+
}
17+
18+
SYCL_EXTERNAL void __throw_runtime_error(const char*)
19+
{
20+
}
21+
};
22+
#endif // __SYCL_DEVICE_ONLY__
23+
#endif
24+
925
#include "support/test_complex.h"
1026

1127
// cyl_bessel_i

test/xpu_api/numerics/special/bessel/bessel_if.pass.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if defined(_GLIBCXX_RELEASE)
10+
#ifdef __SYCL_DEVICE_ONLY__
11+
// Required to define these before all includes
12+
namespace std
13+
{
14+
SYCL_EXTERNAL void __throw_domain_error(const char*)
15+
{
16+
}
17+
18+
SYCL_EXTERNAL void __throw_runtime_error(const char*)
19+
{
20+
}
21+
};
22+
#endif // __SYCL_DEVICE_ONLY__
23+
#endif
24+
925
#include "support/test_complex.h"
1026

1127
// cyl_bessel_if

test/xpu_api/numerics/special/bessel/bessel_j.pass.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if defined(_GLIBCXX_RELEASE)
10+
#ifdef __SYCL_DEVICE_ONLY__
11+
// Required to define these before all includes
12+
namespace std
13+
{
14+
SYCL_EXTERNAL void __throw_domain_error(const char*)
15+
{
16+
}
17+
18+
SYCL_EXTERNAL void __throw_runtime_error(const char*)
19+
{
20+
}
21+
};
22+
#endif // __SYCL_DEVICE_ONLY__
23+
#endif
24+
925
#include "support/test_complex.h"
1026

1127
// cyl_bessel_j

test/xpu_api/numerics/special/bessel/bessel_jf.pass.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if defined(_GLIBCXX_RELEASE)
10+
#ifdef __SYCL_DEVICE_ONLY__
11+
// Required to define these before all includes
12+
namespace std
13+
{
14+
SYCL_EXTERNAL void __throw_domain_error(const char*)
15+
{
16+
}
17+
18+
SYCL_EXTERNAL void __throw_runtime_error(const char*)
19+
{
20+
}
21+
};
22+
#endif // __SYCL_DEVICE_ONLY__
23+
#endif
24+
925
#include "support/test_complex.h"
1026

1127
// cyl_bessel_jf

test/xpu_api/numerics/special/bessel/bessel_k.pass.cpp

+16
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,22 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if defined(_GLIBCXX_RELEASE)
10+
#ifdef __SYCL_DEVICE_ONLY__
11+
// Required to define these before all includes
12+
namespace std
13+
{
14+
SYCL_EXTERNAL void __throw_domain_error(const char*)
15+
{
16+
}
17+
18+
SYCL_EXTERNAL void __throw_runtime_error(const char*)
19+
{
20+
}
21+
};
22+
#endif // __SYCL_DEVICE_ONLY__
23+
#endif
24+
925
#include "support/test_complex.h"
1026

1127
// cyl_bessel_jl

test/xpu_api/numerics/special/bessel/bessel_kf.pass.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,23 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9+
#if defined(_GLIBCXX_RELEASE)
10+
#ifdef __SYCL_DEVICE_ONLY__
11+
// Required to define these before all includes
12+
namespace std
13+
{
14+
SYCL_EXTERNAL void __throw_domain_error(const char*)
15+
{
16+
}
17+
18+
SYCL_EXTERNAL void __throw_runtime_error(const char*)
19+
{
20+
}
21+
};
22+
#endif // __SYCL_DEVICE_ONLY__
23+
#endif
24+
25+
926
#include "support/test_complex.h"
1027

1128
// cyl_bessel_jl

0 commit comments

Comments
 (0)