KhronosGroup / KhronosGroup/SYCL-Docs

Can the types used for kernel names be cv-qualified?

Open
#568 24 comments 0 reactions 1 assignee Claimed by @tahonermann View on GitHub
clarification
Dominant language
JavaScript
Stars
158
Forks
80
Avg merge
7d 6h
Merged PRs (30d)
5

Description

[Section 5.2, "Naming of kernels", of revision 8 of the 2020 SYCL Specification](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#sec:naming.kernels) lists the requirements for naming of SYCL kernels. Those requirements do not prohibit cv-qualified types. (Those requirements also don't require a class type, but the [definition of "kernel name" in the glossary](https://registry.khronos.org/SYCL/specs/sycl-2020/html/sycl-2020.html#kernel-name) states that "A kernel name is a class type"; this might be a separate issue). Is the following program intended to be well-formed? The Intel OneAPI compiler currently accepts it. https://godbolt.org/z/e8enWEEnb.
```
#include
struct Kernel;
int main() {
sycl::queue q;
q.submit(
[=](sycl::handler &cgh) {
cgh.single_task([]() {});
cgh.single_task([]() {});
cgh.single_task([]() {});
cgh.single_task([]() {});
}
);
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.