File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,20 @@ class __SYCL_EXPORT exception : public virtual std::exception {
148
148
friend exception detail::set_pi_error (exception &&e, pi_int32 pi_err);
149
149
};
150
150
151
+ namespace detail {
152
+ // Even though at the moment those functions are only used in library and not
153
+ // in headers, they were put here in case we will need them to implement some
154
+ // of OpenCL (and other backends) interop APIs to query native backend error
155
+ // from an exception.
156
+ // And we don't want them to be part of our library ABI, because of future
157
+ // underlying changes (PI -> UR -> Offload).
158
+ inline pi_int32 get_pi_error (const exception &e) { return e.MPIErr ; }
159
+ inline exception set_pi_error (exception &&e, pi_int32 pi_err) {
160
+ e.MPIErr = pi_err;
161
+ return std::move (e);
162
+ }
163
+ } // namespace detail
164
+
151
165
} // namespace _V1
152
166
} // namespace sycl
153
167
Original file line number Diff line number Diff line change @@ -66,12 +66,6 @@ std::error_code make_error_code(sycl::errc Err) noexcept {
66
66
}
67
67
68
68
namespace detail {
69
- pi_int32 get_pi_error (const exception &e) { return e.MPIErr ; }
70
- exception set_pi_error (exception &&e, pi_int32 pi_err) {
71
- e.MPIErr = pi_err;
72
- return std::move (e);
73
- }
74
-
75
69
__SYCL_EXPORT const char *stringifyErrorCode (pi_int32 error) {
76
70
switch (error) {
77
71
#define _PI_ERRC (NAME, VAL ) \
You can’t perform that action at this time.
0 commit comments