Suggestion for improving the sycl_ext_oneapi_local_memory extension #17903
fabiomestre
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The
sycl_ext_oneapi_local_memoryextension returns asycl::multi_ptrto point to the local memory. However, the syntax to access the local memory can be confusing.
The main issue is that
multi_ptralso implements the[]operator. This can leadto subtle errors. For example:
I'm wondering if, either this extension or
multi_ptr, could be improved to make these kinds of user errors detectable at compile time? For example, when the type is a C array, it doesn't make sense to use the[]operator ofmulti_ptr. Maybe astatic_assertcould be added or the operator could be disabled in that case?Beta Was this translation helpful? Give feedback.
All reactions