Skip to content

Conversation

@againull
Copy link
Contributor

@againull againull commented Aug 12, 2024

There is no need to use the detail::array::get() with bounds checking as it is guaranteed that we don't go out-of-bounds in this case, so just use underlying storage directly to calculate the size.

This is also necessary because accessor::size() and buffer::size() methods are noexcept by spec and their implementation use range::size();

@againull againull requested a review from a team as a code owner August 12, 2024 19:53
@againull againull requested a review from maarquitos14 August 12, 2024 19:53
There is no need to use operator[] of the detail::array with bounds checking
as it is guaranteed that we don't go out-of-bounds in this case, so just
use underlying storage directly to calculate the size.

This is also necessary because accessor::size() and buffer::size()
methods are noexcept by spec and their implementation use range::size();
@againull againull merged commit fe6e307 into intel:sycl Aug 13, 2024
AlexeySachkov pushed a commit to AlexeySachkov/llvm that referenced this pull request Nov 26, 2024
There is no need to use the detail::array::get() with bounds checking as
it is guaranteed that we don't go out-of-bounds in this case, so just
use underlying storage directly to calculate the size.

This is also necessary because accessor::size() and buffer::size()
methods are noexcept by spec and their implementation use range::size();
@againull againull deleted the bugfix/static_analyzer branch September 29, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants