KhronosGroup / KhronosGroup/SYCL-Docs

Store on vec may take pointer to constant type

Open
#541 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
158
Forks
80
Avg merge
7d 6h
Merged PRs (30d)
5

Description

The `store` member function on `sycl::vec` takes a `multi_ptr` 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 https://github.com/KhronosGroup/SYCL-Docs/issues/540.

Possible solution: Change the signature to:

```c++
template
void store(size_t offset, multi_ptr, AddressSpace, IsDecorated> ptr) const;
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the sycl::vec::store declaration in the specification sources and review the linked SYCL-Docs issue 540 for the related const behavior. Confirm the intended multi_ptr signature from the issue, then update the documented API so the completed signature consistently handles const DataT.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.