diff --git a/sycl/include/sycl/detail/array.hpp b/sycl/include/sycl/detail/array.hpp index 2016c62d6878f..870cd49f07ac7 100644 --- a/sycl/include/sycl/detail/array.hpp +++ b/sycl/include/sycl/detail/array.hpp @@ -59,14 +59,6 @@ template class array { return result; } - operator sycl::range() const { - sycl::range result; - for (int i = 0; i < dimensions; ++i) { - result[i] = common_array[i]; - } - return result; - } - size_t get(int dimension) const { check_dimension(dimension); return common_array[dimension]; diff --git a/sycl/include/sycl/detail/cg_types.hpp b/sycl/include/sycl/detail/cg_types.hpp index ff01f2ec7af86..05f255343fa6e 100644 --- a/sycl/include/sycl/detail/cg_types.hpp +++ b/sycl/include/sycl/detail/cg_types.hpp @@ -398,7 +398,8 @@ class HostKernel : public HostKernelBase { GlobalSize, LocalSize, GroupSize, GroupID); detail::NDLoop::iterate(LocalSize, [&](const id &LocalID) { - id GlobalID = GroupID * LocalSize + LocalID + GlobalOffset; + id GlobalID = + GroupID * id{LocalSize} + LocalID + GlobalOffset; const sycl::item GlobalItem = IDBuilder::createItem(GlobalSize, GlobalID, GlobalOffset); diff --git a/sycl/include/sycl/group.hpp b/sycl/include/sycl/group.hpp index 0553513f16a31..35c6bc9c9eac5 100644 --- a/sycl/include/sycl/group.hpp +++ b/sycl/include/sycl/group.hpp @@ -204,7 +204,7 @@ template class __SYCL_TYPE(group) group { Func(HItem); #else - id GroupStartID = index * localRange; + id GroupStartID = index * id{localRange}; // ... host variant needs explicit 'iterate' because it is serial detail::NDLoop::iterate( diff --git a/sycl/include/sycl/id.hpp b/sycl/include/sycl/id.hpp index 999ea2e495bb6..bc17ff460e0eb 100644 --- a/sycl/include/sycl/id.hpp +++ b/sycl/include/sycl/id.hpp @@ -99,16 +99,6 @@ template class id : public detail::array { id(ParamTy> &item) : base(item.get_id(0), item.get_id(1), item.get_id(2)) {} - __SYCL_DEPRECATED("range() conversion is deprecated") - explicit operator range() const { - range result( - detail::InitializedVal::template get<0>()); - for (int i = 0; i < Dimensions; ++i) { - result[i] = this->get(i); - } - return result; - } - #ifndef __SYCL_DISABLE_ID_TO_INT_CONV__ /* Template operator is not allowed because it disables further type * conversion. For example, the next code will not work in case of template diff --git a/sycl/test/basic_tests/id.cpp b/sycl/test/basic_tests/id.cpp index b253f462c0eeb..4be7959ab5631 100644 --- a/sycl/test/basic_tests/id.cpp +++ b/sycl/test/basic_tests/id.cpp @@ -262,18 +262,6 @@ int main() { ((twoLeftValue op three_dim_op_right)[1] == \ (twoLeftValue op twoRightValue)) && \ ((three_dim_op_left op threeRightValue)[2] == \ - (threeLeftValue op threeRightValue))); \ - assert((one_dim_op_left op one_dim_op_range)[0] == \ - (oneLeftValue op oneRightValue)); \ - assert(((two_dim_op_left op two_dim_op_range)[0] == \ - (oneLeftValue op oneRightValue)) && \ - ((two_dim_op_left op two_dim_op_range)[1] == \ - (twoLeftValue op twoRightValue))); \ - assert(((three_dim_op_left op three_dim_op_range)[0] == \ - (oneLeftValue op oneRightValue)) && \ - ((three_dim_op_left op three_dim_op_range)[1] == \ - (twoLeftValue op twoRightValue)) && \ - ((three_dim_op_left op three_dim_op_range)[2] == \ (threeLeftValue op threeRightValue))); OPERATOR_TEST(+) diff --git a/sycl/test/warnings/conversion_deprecation.cpp b/sycl/test/warnings/conversion_deprecation.cpp deleted file mode 100644 index 02869645a6f85..0000000000000 --- a/sycl/test/warnings/conversion_deprecation.cpp +++ /dev/null @@ -1,11 +0,0 @@ -// RUN: %clangxx %fsycl-host-only -fsyntax-only -Xclang -verify -Xclang -verify-ignore-unexpected=note %s - -#include - -int main() { - sycl::id<1> id_obj(64); - // expected-warning@+1 {{'operator range' is deprecated: range() conversion is deprecated}} - (void)(sycl::range<1>)id_obj; - - return 0; -}