Skip to content

Commit 0ce0d36

Browse files
maximdimakovsmaslov-intelmlychkov
authored
[SYCL] Changes to suppress some warnings (#3935)
* Remove inheritance from std::iterator * Define macro to suppress warnings Signed-off-by: mdimakov <[email protected]> Co-authored-by: smaslov-intel <[email protected]> Co-authored-by: Mikhail Lychkov <[email protected]>
1 parent 7ac7f9e commit 0ce0d36

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

sycl/include/CL/sycl/detail/pi.hpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,16 +225,16 @@ class DeviceBinaryImage {
225225
public:
226226
using ValTy = std::remove_pointer<pi_device_binary_property>::type;
227227

228-
class ConstIterator
229-
: public std::iterator<std::input_iterator_tag, // iterator_category
230-
ValTy, // value_type
231-
ptrdiff_t, // difference_type
232-
const pi_device_binary_property, // pointer
233-
pi_device_binary_property> // reference
234-
{
228+
class ConstIterator {
235229
pi_device_binary_property Cur;
236230

237231
public:
232+
using iterator_category = std::input_iterator_tag;
233+
using value_type = ValTy;
234+
using difference_type = ptrdiff_t;
235+
using pointer = const pi_device_binary_property;
236+
using reference = pi_device_binary_property;
237+
238238
ConstIterator(pi_device_binary_property Cur = nullptr) : Cur(Cur) {}
239239
ConstIterator &operator++() {
240240
Cur++;

sycl/plugins/opencl/pi_opencl.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
///
1515
/// \ingroup sycl_pi_ocl
1616

17+
#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
18+
1719
#include <CL/sycl/detail/cl.h>
1820
#include <CL/sycl/detail/pi.h>
1921

0 commit comments

Comments
 (0)