Skip to content

Commit f84d491

Browse files
authored
[SYCL][GRAPHS][DOCS] Updated the example so it compiles. (#15477)
There was a small problem with the dot product example that did not allow for correct compilation.
1 parent 1d4e066 commit f84d491

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sycl/doc/syclgraph/SYCLGraphUsageGuide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ This example uses the explicit graph creation API to perform a dot product
186186
operation.
187187
188188
```c++
189+
#include <sycl/sycl.hpp>
189190
#include <sycl/ext/oneapi/experimental/graph.hpp>
190191
191192
int main() {
@@ -240,7 +241,7 @@ int main() {
240241
[&](sycl::handler& h) {
241242
h.single_task([=]() {
242243
for(size_t i = 0; i < n; i++){
243-
dotp += x[i] * z[i];
244+
*dotp += x[i] * z[i];
244245
}
245246
});
246247
},

0 commit comments

Comments
 (0)