You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Revere counter iterator looks like a little bit strange for me,
As far as I know we already have oneapi::dpl::counting_iterator. Is it not enough?
Also when I see the API like _Index __first, _Index __last I assume that the element before __first isn't exist and the element iterated by __last isn't exist too. From this point of view what does it mean __first - 1 below?
We have a _ReverseCounter utility which is used in __pstl_left_bound to run an upper bound operation in reverse. We should be able to achieve a similar effect with oneapi::dpl::counting_iterator. Additionally, it's usage sets the end index to __first - 1 which will likely be problematic if __first is an unsigned type and is passed as 0.
The text was updated successfully, but these errors were encountered:
The following TODO is also listed in the implementation of _ReverseCounter:
// TODO: Temporary hotfix. Investigate the necessity of _ReverseCounter
// Investigate potential user types convertible to integral
// This is the compile-time trick where we define the conversion operator to sycl::id
// conditionally. If we can call accessor::operator[] with the type that converts to the
// same integral type as _ReverseCounter (it means that we can call accessor::operator[]
// with the _ReverseCounter itself) then we don't need conversion operator to sycl::id.
// Otherwise, we define conversion operator to sycl::id.
As far as I know we already have
oneapi::dpl::counting_iterator
. Is it not enough?Also when I see the API like
_Index __first, _Index __last
I assume that the element before__first
isn't exist and the element iterated by__last
isn't exist too. From this point of view what does it mean__first - 1
below?Originally posted by @SergeyKopienko in #1446 (comment)
We have a
_ReverseCounter
utility which is used in__pstl_left_bound
to run an upper bound operation in reverse. We should be able to achieve a similar effect withoneapi::dpl::counting_iterator
. Additionally, it's usage sets theend
index to__first - 1
which will likely be problematic if__first
is an unsigned type and is passed as0
.The text was updated successfully, but these errors were encountered: