Skip to content

Commit

Permalink
[SYCL][GRAPHS][DOCS] Updated the example so it compiles. (#15477)
Browse files Browse the repository at this point in the history
There was a small problem with the dot product example that did not
allow for correct compilation.
  • Loading branch information
lrpablo authored Sep 24, 2024
1 parent 1d4e066 commit f84d491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sycl/doc/syclgraph/SYCLGraphUsageGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ This example uses the explicit graph creation API to perform a dot product
operation.
```c++
#include <sycl/sycl.hpp>
#include <sycl/ext/oneapi/experimental/graph.hpp>
int main() {
Expand Down Expand Up @@ -240,7 +241,7 @@ int main() {
[&](sycl::handler& h) {
h.single_task([=]() {
for(size_t i = 0; i < n; i++){
dotp += x[i] * z[i];
*dotp += x[i] * z[i];
}
});
},
Expand Down

0 comments on commit f84d491

Please sign in to comment.