Skip to content

Conversation

@aelovikov-intel
Copy link
Contributor

No description provided.


#include <sycl/detail/defines_elementary.hpp> // for __SYCL_ALWAYS_INLINE

#ifndef __SYCL_DEVICE_ONLY__
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessary because the use is guarded already:

size_t common_array[dimensions];
__SYCL_ALWAYS_INLINE void check_dimension(int dimension) const {
#ifndef __SYCL_DEVICE_ONLY__
if (dimension >= dimensions || dimension < 0) {
throw sycl::exception(make_error_code(errc::invalid),
"Index out of range");
}
#endif
(void)dimension;
}

@aelovikov-intel aelovikov-intel merged commit 40cb422 into intel:sycl Sep 11, 2025
28 checks passed
@aelovikov-intel aelovikov-intel deleted the array-exception-device branch September 11, 2025 17:35
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