File tree Expand file tree Collapse file tree 5 files changed +27
-24
lines changed Expand file tree Collapse file tree 5 files changed +27
-24
lines changed Original file line number Diff line number Diff line change @@ -148,13 +148,6 @@ class __SYCL_EXPORT tls_code_loc_t {
148
148
bool MLocalScope = true ;
149
149
};
150
150
151
- __SYCL_EXPORT const char *stringifyErrorCode (pi_int32 error);
152
-
153
- inline std::string codeToString (pi_int32 code) {
154
- return std::string (std::to_string (code) + " (" + stringifyErrorCode (code) +
155
- " )" );
156
- }
157
-
158
151
} // namespace detail
159
152
} // namespace _V1
160
153
} // namespace sycl
Original file line number Diff line number Diff line change 12
12
13
13
#include < sycl/backend_types.hpp> // for backend
14
14
#include < sycl/detail/cl.h> // for cl_int
15
- #include < sycl/detail/common.hpp> // for codeToString
16
15
#include < sycl/detail/defines_elementary.hpp> // for __SYCL2020_DEPRECATED
17
16
#include < sycl/detail/export.hpp> // for __SYCL_EXPORT
18
17
#include < sycl/detail/pi.h> // for pi_int32
@@ -58,6 +57,13 @@ __SYCL_EXPORT std::error_code make_error_code(sycl::errc E) noexcept;
58
57
__SYCL_EXPORT const std::error_category &sycl_category () noexcept ;
59
58
60
59
namespace detail {
60
+ __SYCL_EXPORT const char *stringifyErrorCode (pi_int32 error);
61
+
62
+ inline std::string codeToString (pi_int32 code) {
63
+ return std::string (std::to_string (code) + " (" + stringifyErrorCode (code) +
64
+ " )" );
65
+ }
66
+
61
67
class __SYCL_EXPORT SYCLCategory : public std::error_category {
62
68
public:
63
69
const char *name () const noexcept override { return " sycl" ; }
Original file line number Diff line number Diff line change @@ -53,22 +53,6 @@ tls_code_loc_t::~tls_code_loc_t() {
53
53
54
54
const detail::code_location &tls_code_loc_t ::query() { return GCodeLocTLS; }
55
55
56
- const char *stringifyErrorCode (pi_int32 error) {
57
- switch (error) {
58
- #define _PI_ERRC (NAME, VAL ) \
59
- case NAME: \
60
- return #NAME;
61
- #define _PI_ERRC_WITH_MSG (NAME, VAL, MSG ) \
62
- case NAME: \
63
- return MSG;
64
- #include < sycl/detail/pi_error.def>
65
- #undef _PI_ERRC
66
- #undef _PI_ERRC_WITH_MSG
67
-
68
- default :
69
- return " Unknown error code" ;
70
- }
71
- }
72
56
} // namespace detail
73
57
} // namespace _V1
74
58
} // namespace sycl
Original file line number Diff line number Diff line change @@ -94,5 +94,24 @@ std::error_code make_error_code(sycl::errc Err) noexcept {
94
94
return {static_cast <int >(Err), sycl_category ()};
95
95
}
96
96
97
+ namespace detail {
98
+ const char *stringifyErrorCode (pi_int32 error) {
99
+ switch (error) {
100
+ #define _PI_ERRC (NAME, VAL ) \
101
+ case NAME: \
102
+ return #NAME;
103
+ #define _PI_ERRC_WITH_MSG (NAME, VAL, MSG ) \
104
+ case NAME: \
105
+ return MSG;
106
+ #include < sycl/detail/pi_error.def>
107
+ #undef _PI_ERRC
108
+ #undef _PI_ERRC_WITH_MSG
109
+
110
+ default :
111
+ return " Unknown error code" ;
112
+ }
113
+ }
114
+ } // namespace detail
115
+
97
116
} // namespace _V1
98
117
} // namespace sycl
Original file line number Diff line number Diff line change 8
8
9
9
#include < CL/__spirv/spirv_ops.hpp>
10
10
#include < detail/platform_util.hpp>
11
+ #include < sycl/detail/iostream_proxy.hpp>
11
12
#include < sycl/exception.hpp>
12
13
13
14
#include < atomic>
You can’t perform that action at this time.
0 commit comments