KhronosGroup / KhronosGroup/SYCL-Docs

Load on vec does not allow pointer to non-const data.

Open
#540 4 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 `load` member function on `sycl::vec` takes a `multi_ptr` which seems to written that way to allow pointers with and without `const` data. However, because the function is dependent, the conversion from `multi_ptr` to `multi_ptr` cannot be resolved. See https://godbolt.org/z/dTdc6K7a9.

Possible solution: Make two overloads of `load` - one with `multi_ptr, ...>` and one with `multi_ptr, ...>`. See https://godbolt.org/z/xs175dc7v.

Inspired by https://github.com/KhronosGroup/SYCL-CTS/pull/870.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the sycl::vec::load member function and reproduce the failure using the Godbolt example linked in the issue. Compare the proposed overload approach with the second Godbolt example, and consider the behavior demonstrated by SYCL-CTS pull request 870; done means loading from a non-const multi_ptr is accepted.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.