Skip to content

Commit b21f70e

Browse files
author
iclsrc
committed
Merge from 'sycl' to 'sycl-web'
2 parents 63ff3ac + f70ad5b commit b21f70e

25 files changed

+403
-622
lines changed

sycl/include/sycl/detail/util.hpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
#ifndef __SYCL_DEVICE_ONLY
1212

1313
#include <sycl/detail/defines.hpp>
14-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
1514
#include <sycl/detail/string.hpp>
16-
#endif
15+
1716
#include <cstring>
1817
#include <mutex>
1918
#include <vector>
@@ -69,7 +68,6 @@ struct CmpCStr {
6968

7069
using SerializedObj = std::vector<unsigned char>;
7170

72-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
7371
template <typename T> struct ABINeutralT { using type = T; };
7472
// We need special handling of std::string to handle ABI incompatibility
7573
// for get_info<>() when it returns std::string and vector<std::string>.
@@ -85,10 +83,6 @@ template <> struct ABINeutralT<std::vector<std::string>> {
8583
};
8684

8785
template <typename T> using ABINeutralT_t = typename ABINeutralT<T>::type;
88-
#else
89-
template <typename T> using ABINeutralT_t = T;
90-
#endif
91-
9286
} // namespace detail
9387
} // namespace _V1
9488
} // namespace sycl

sycl/include/sycl/device.hpp

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
#include <sycl/detail/info_desc_helpers.hpp>
1616
#include <sycl/detail/owner_less_base.hpp>
1717
#include <sycl/detail/pi.h>
18-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
1918
#include <sycl/detail/string.hpp>
2019
#include <sycl/detail/string_view.hpp>
21-
#endif
2220
#include <sycl/detail/util.hpp>
2321
#include <sycl/device_selector.hpp>
2422
#include <sycl/ext/oneapi/experimental/device_architecture.hpp>
@@ -221,17 +219,10 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
221219
/// type associated with the param parameter.
222220
///
223221
/// \return device info of type described in Table 4.20.
224-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
225222
template <typename Param>
226223
typename detail::is_device_info_desc<Param>::return_type get_info() const {
227224
return detail::convert_from_abi_neutral(get_info_impl<Param>());
228225
}
229-
#else
230-
template <typename Param>
231-
detail::ABINeutralT_t<
232-
typename detail::is_device_info_desc<Param>::return_type>
233-
get_info() const;
234-
#endif
235226

236227
/// Queries this SYCL device for SYCL backend-specific information.
237228
///
@@ -377,12 +368,10 @@ class __SYCL_EXPORT device : public detail::OwnerLessBase<device> {
377368
friend auto get_native(const SyclObjectT &Obj)
378369
-> backend_return_t<BackendName, SyclObjectT>;
379370

380-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
381371
template <typename Param>
382372
typename detail::ABINeutralT_t<
383373
typename detail::is_device_info_desc<Param>::return_type>
384374
get_info_impl() const;
385-
#endif
386375
};
387376

388377
} // namespace _V1

sycl/include/sycl/exception.hpp

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,21 +74,13 @@ class __SYCL_EXPORT exception : public virtual std::exception {
7474

7575
exception(std::error_code, const char *Msg);
7676

77-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
7877
exception(std::error_code Ec, const std::string &Msg)
7978
: exception(Ec, nullptr, Msg.c_str()) {}
80-
#else
81-
exception(std::error_code, const std::string &Msg);
82-
#endif
8379

8480
// new SYCL 2020 constructors
8581
exception(std::error_code);
86-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
8782
exception(int EV, const std::error_category &ECat, const std::string &WhatArg)
8883
: exception(EV, ECat, WhatArg.c_str()) {}
89-
#else
90-
exception(int, const std::error_category &, const std::string &);
91-
#endif
9284
exception(int, const std::error_category &, const char *);
9385
exception(int, const std::error_category &);
9486

@@ -137,16 +129,11 @@ class __SYCL_EXPORT exception : public virtual std::exception {
137129
// base constructor for all SYCL 2020 constructors
138130
// exception(context *ctxPtr, std::error_code Ec, const std::string
139131
// &what_arg);
140-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
141132
exception(std::error_code Ec, std::shared_ptr<context> SharedPtrCtx,
142133
const std::string &what_arg)
143134
: exception(Ec, SharedPtrCtx, what_arg.c_str()) {}
144135
exception(std::error_code Ec, std::shared_ptr<context> SharedPtrCtx,
145136
const char *WhatArg);
146-
#else
147-
exception(std::error_code Ec, std::shared_ptr<context> SharedPtrCtx,
148-
const std::string &what_arg);
149-
#endif
150137
};
151138

152139
class __SYCL2020_DEPRECATED(

sycl/include/sycl/handler.hpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
#include <sycl/detail/pi.h>
2222
#include <sycl/detail/pi.hpp>
2323
#include <sycl/detail/reduction_forward.hpp>
24-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2524
#include <sycl/detail/string.hpp>
2625
#include <sycl/detail/string_view.hpp>
27-
#endif
2826
#include <sycl/device.hpp>
2927
#include <sycl/event.hpp>
3028
#include <sycl/exception.hpp>
@@ -422,11 +420,6 @@ template <int Dims> bool range_size_fits_in_size_t(const range<Dims> &r) {
422420
}
423421
return true;
424422
}
425-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
426-
using string = std::string;
427-
using string_view = std::string;
428-
#endif
429-
430423
} // namespace detail
431424

432425
/// Command group handler class.
@@ -872,14 +865,10 @@ class __SYCL_EXPORT handler {
872865
///
873866
/// \param KernelName is the name of the SYCL kernel to check that the used
874867
/// kernel bundle contains.
875-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
876868
void verifyUsedKernelBundle(const std::string &KernelName) {
877869
verifyUsedKernelBundleInternal(detail::string_view{KernelName});
878870
}
879871
void verifyUsedKernelBundleInternal(detail::string_view KernelName);
880-
#else
881-
void verifyUsedKernelBundle(const std::string &KernelName);
882-
#endif
883872

884873
/// Stores lambda to the template-free object
885874
///
@@ -3414,35 +3403,25 @@ class __SYCL_EXPORT handler {
34143403
/// expr m_Storage member
34153404
/// \param Size the size of data getting read back / to.
34163405
/// \param Block if read operation is blocking, default to false.
3417-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
34183406
void ext_intel_read_host_pipe(const std::string &Name, void *Ptr, size_t Size,
34193407
bool Block = false) {
34203408
ext_intel_read_host_pipe(detail::string_view(Name), Ptr, Size, Block);
34213409
}
34223410
void ext_intel_read_host_pipe(detail::string_view Name, void *Ptr,
34233411
size_t Size, bool Block = false);
3424-
#else
3425-
void ext_intel_read_host_pipe(const std::string &Name, void *Ptr, size_t Size,
3426-
bool Block = false);
3427-
#endif
34283412

34293413
/// Write to host pipes given a host address and
34303414
/// \param Name name of the host pipe to be passed into lower level runtime
34313415
/// \param Ptr host pointer of host pipe as identified by address of its const
34323416
/// expr m_Storage member
34333417
/// \param Size the size of data getting read back / to.
34343418
/// \param Block if write opeartion is blocking, default to false.
3435-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
34363419
void ext_intel_write_host_pipe(const std::string &Name, void *Ptr,
34373420
size_t Size, bool Block = false) {
34383421
ext_intel_write_host_pipe(detail::string_view(Name), Ptr, Size, Block);
34393422
}
34403423
void ext_intel_write_host_pipe(detail::string_view Name, void *Ptr,
34413424
size_t Size, bool Block = false);
3442-
#else
3443-
void ext_intel_write_host_pipe(const std::string &Name, void *Ptr,
3444-
size_t Size, bool Block = false);
3445-
#endif
34463425
friend class ext::oneapi::experimental::detail::graph_impl;
34473426
friend class ext::oneapi::experimental::detail::dynamic_parameter_impl;
34483427

sycl/include/sycl/kernel.hpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@
1515
#include <sycl/detail/info_desc_helpers.hpp> // for is_kernel_device_specif...
1616
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
1717
#include <sycl/detail/pi.h> // for pi_native_handle
18-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
1918
#include <sycl/detail/string.hpp>
2019
#include <sycl/detail/string_view.hpp>
21-
#endif
2220
#include <sycl/detail/util.hpp>
2321
#include <sycl/device.hpp> // for device
2422
#include <sycl/kernel_bundle_enums.hpp> // for bundle_state
@@ -142,13 +140,9 @@ class __SYCL_EXPORT kernel : public detail::OwnerLessBase<kernel> {
142140
///
143141
/// \return depends on information being queried.
144142
template <typename Param>
145-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
146143
typename detail::is_kernel_info_desc<Param>::return_type get_info() const {
147144
return detail::convert_from_abi_neutral(get_info_impl<Param>());
148145
}
149-
#else
150-
typename detail::is_kernel_info_desc<Param>::return_type get_info() const;
151-
#endif
152146

153147
/// Queries the kernel object for SYCL backend-specific information.
154148
///
@@ -201,12 +195,10 @@ class __SYCL_EXPORT kernel : public detail::OwnerLessBase<kernel> {
201195
template <backend BackendName, class SyclObjectT>
202196
friend auto get_native(const SyclObjectT &Obj)
203197
-> backend_return_t<BackendName, SyclObjectT>;
204-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
205198
template <typename Param>
206199
typename detail::ABINeutralT_t<
207200
typename detail::is_kernel_info_desc<Param>::return_type>
208201
get_info_impl() const;
209-
#endif
210202
};
211203
} // namespace _V1
212204
} // namespace sycl

sycl/include/sycl/kernel_bundle.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
#include <sycl/detail/owner_less_base.hpp> // for OwnerLessBase
1616
#include <sycl/detail/pi.h> // for pi_native_handle
1717
#include <sycl/detail/pi.hpp> // for cast
18-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
1918
#include <sycl/detail/string_view.hpp>
20-
#endif
2119
#include <sycl/device.hpp> // for device
2220
#include <sycl/kernel.hpp> // for kernel, kernel_bundle
2321
#include <sycl/kernel_bundle_enums.hpp> // for bundle_state
@@ -450,9 +448,6 @@ kernel_bundle(kernel_bundle<State> &&) -> kernel_bundle<State>;
450448
/////////////////////////
451449

452450
namespace detail {
453-
#ifndef __INTEL_PREVIEW_BREAKING_CHANGES
454-
using string_view = std::string;
455-
#endif
456451
// Internal non-template versions of get_kernel_id API which is used by public
457452
// onces
458453
__SYCL_EXPORT kernel_id get_kernel_id_impl(string_view KernelName);
@@ -463,11 +458,7 @@ template <typename KernelName> kernel_id get_kernel_id() {
463458
// FIXME: This must fail at link-time if KernelName not in any available
464459
// translation units.
465460
using KI = sycl::detail::KernelInfo<KernelName>;
466-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
467461
return detail::get_kernel_id_impl(detail::string_view{KI::getName()});
468-
#else
469-
return detail::get_kernel_id_impl(KI::getName());
470-
#endif
471462
}
472463

473464
/// \returns a vector with all kernel_id's defined in the application

sycl/include/sycl/platform.hpp

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@
1616
#include <sycl/detail/info_desc_helpers.hpp>
1717
#include <sycl/detail/owner_less_base.hpp>
1818
#include <sycl/detail/pi.h>
19-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
2019
#include <sycl/detail/string.hpp>
2120
#include <sycl/detail/string_view.hpp>
22-
#endif
2321
#include <sycl/detail/util.hpp>
2422
#include <sycl/device_selector.hpp>
2523
#include <sycl/info/info_desc.hpp>
@@ -58,7 +56,6 @@ class platform_impl;
5856
void __SYCL_EXPORT enable_ext_oneapi_default_context(bool Val);
5957

6058
template <typename ParamT> auto convert_to_abi_neutral(ParamT &&Info) {
61-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
6259
using ParamNoRef = std::remove_reference_t<ParamT>;
6360
if constexpr (std::is_same_v<ParamNoRef, std::string>) {
6461
return detail::string{Info};
@@ -72,13 +69,9 @@ template <typename ParamT> auto convert_to_abi_neutral(ParamT &&Info) {
7269
} else {
7370
return std::forward<ParamT>(Info);
7471
}
75-
#else
76-
return std::forward<ParamT>(Info);
77-
#endif
7872
}
7973

8074
template <typename ParamT> auto convert_from_abi_neutral(ParamT &&Info) {
81-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
8275
using ParamNoRef = std::remove_reference_t<ParamT>;
8376
if constexpr (std::is_same_v<ParamNoRef, detail::string>) {
8477
return Info.c_str();
@@ -93,9 +86,6 @@ template <typename ParamT> auto convert_from_abi_neutral(ParamT &&Info) {
9386
} else {
9487
return std::forward<ParamT>(Info);
9588
}
96-
#else
97-
return std::forward<ParamT>(Info);
98-
#endif
9989
}
10090
} // namespace detail
10191
namespace ext::oneapi {
@@ -190,17 +180,10 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase<platform> {
190180
/// Queries this SYCL platform for info.
191181
///
192182
/// The return type depends on information being queried.
193-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
194183
template <typename Param>
195184
typename detail::is_platform_info_desc<Param>::return_type get_info() const {
196185
return detail::convert_from_abi_neutral(get_info_impl<Param>());
197186
}
198-
#else
199-
template <typename Param>
200-
detail::ABINeutralT_t<
201-
typename detail::is_platform_info_desc<Param>::return_type>
202-
get_info() const;
203-
#endif
204187

205188
/// Queries this SYCL platform for SYCL backend-specific info.
206189
///
@@ -269,12 +252,10 @@ class __SYCL_EXPORT platform : public detail::OwnerLessBase<platform> {
269252
friend auto get_native(const SyclObjectT &Obj)
270253
-> backend_return_t<BackendName, SyclObjectT>;
271254

272-
#ifdef __INTEL_PREVIEW_BREAKING_CHANGES
273255
template <typename Param>
274256
typename detail::ABINeutralT_t<
275257
typename detail::is_platform_info_desc<Param>::return_type>
276258
get_info_impl() const;
277-
#endif
278259
}; // class platform
279260
} // namespace _V1
280261
} // namespace sycl

sycl/include/sycl/sycl.hpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@
105105
#include <sycl/ext/oneapi/sub_group.hpp>
106106
#include <sycl/ext/oneapi/sub_group_mask.hpp>
107107
#include <sycl/ext/oneapi/weak_object.hpp>
108-
#if !defined(SYCL2020_CONFORMANT_APIS) && \
109-
!defined(__INTEL_PREVIEW_BREAKING_CHANGES)
110-
// We used to include those and some code might be reliant on that.
111-
#include <cmath>
112-
#include <complex>
113-
#endif
114108

115109
#if !defined(__INTEL_PREVIEW_BREAKING_CHANGES)
116110
namespace sycl {

0 commit comments

Comments
 (0)