Skip to content

Commit

Permalink
Enqueueing a Kernel: add const qualifier (#379)
Browse files Browse the repository at this point in the history
SYCL 2020 spec section 4.12.1 requires the operator()
in a kernel function object to be const-qualified.
  • Loading branch information
rafbiels authored Dec 2, 2024
1 parent 3d5db69 commit 4629ba8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Binary file modified Lesson_Materials/Enqueueing_a_Kernel/Enqueuing_a_Kernel.pdf
Binary file not shown.
5 changes: 3 additions & 2 deletions Lesson_Materials/Enqueueing_a_Kernel/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@
<div class="col">
<code><pre>
struct my_kernel {
void operator()(){
void operator()() const {
/* kernel function */
}
};
Expand All @@ -383,6 +383,7 @@
<div class="col" data-markdown>
* As well as defining SYCL kernels using lambda expressions,
You can also define a SYCL kernel using a regular C++ function object.
* Define a type with a public const-qualified `operator()` member function.
</div>
</div>
</section>
Expand All @@ -395,7 +396,7 @@
<div class="col">
<code><pre>
struct my_kernel {
void operator()(){
void operator()() const {
/* kernel function */
}
};
Expand Down

0 comments on commit 4629ba8

Please sign in to comment.