KhronosGroup / KhronosGroup/SYCL-CTS
Using accessor with vector load store methods
- Dominant language
- C++
- Stars
- 75
- Forks
- 96
- Avg merge
- 5d 18h
- Merged PRs (30d)
- 4
Description
Conformance tests invoke vec's load and store methods passing accessor:
https://github.com/KhronosGroup/SYCL-CTS/blob/d7281bff18586525fea4fbc82d2a6c9e0d31388d/tests/vector_load_store/generate_vector_load_store.py#L40-L41
There's no such overloading in the spec. And while there's a constructor that can create a multi_ptr from an accessor, looks like compilers fail to deduce template arguments in such cases.
I have prepared a small reproducer that implements the same interface as in the spec:
```cpp
#include
enum class address_space {
local,
global
};
enum class access_target {
global,
local,
constant
};
enum class mode {
read,
write
};
enum class placeholder {
true_t,
false_t
};
template
class accessor {
};
template
class multi_ptr {
template ::type>
multi_ptr(accessor) {}
};
template
void foo(multi_ptr mptr) {}
void bar() {
accessor a;
foo(a);
}
```
Neither of clang, gcc or MSVC is able to compile this code. One could use template deduction guides, but they're C++17 feature.
So, should we update the spec by adding a new overload or is it a deficiency of the conformance test suite?
Contributor guide
Assessment
This issue has not been assessed yet.