Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store on vec may take pointer to constant type #541

Open
steffenlarsen opened this issue Mar 7, 2024 · 0 comments
Open

Store on vec may take pointer to constant type #541

steffenlarsen opened this issue Mar 7, 2024 · 0 comments

Comments

@steffenlarsen
Copy link
Contributor

The store member function on sycl::vec takes a multi_ptr<DataT, ...> argument without considering whether or not DataT is const. Since the function intends to write to the pointer this seems unintentional. If this is intentional, this function is affected by the same problem as described in #540.

Possible solution: Change the signature to:

template <access::address_space AddressSpace, access::decorated IsDecorated>
void store(size_t offset, multi_ptr<std::remove_const_t<DataT>, AddressSpace, IsDecorated> ptr) const;
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

No branches or pull requests

1 participant