Skip to content

Commit 51a0543

Browse files
committed
fixed tf_init call
Signed-off-by: todd.erdner <[email protected]>
1 parent ae020b6 commit 51a0543

File tree

1 file changed

+8
-10
lines changed
  • DirectProgramming/DPC++/ParallelPatterns/dpc_reduce/src

1 file changed

+8
-10
lines changed

DirectProgramming/DPC++/ParallelPatterns/dpc_reduce/src/main.cpp

100644100755
Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,14 @@
66
#include <CL/sycl.hpp>
77
#include <iomanip> // setprecision library
88
#include <iostream>
9-
10-
// The include folder is located at %ONEAPI_ROOT%\dev-utilities\latest\include
11-
// on your development system.
129
#include <oneapi/dpl/algorithm>
1310
#include <oneapi/dpl/execution>
1411
#include <oneapi/dpl/iterator>
15-
16-
// dpc_common.hpp can be found in the dev-utilities include folder.
17-
// e.g., $ONEAPI_ROOT/dev-utilities//include/dpc_common.hpp
1812
#include "dpc_common.hpp"
13+
// Many oneAPI code samples share common include files. These
14+
// include files are installed locally with the product installation
15+
// and can be located at %ONEAPI_ROOT%\dev-utilities\latest\include
16+
// on your development system.
1917

2018
using namespace sycl;
2119

@@ -234,8 +232,8 @@ float calc_pi_dpstd_native3(size_t num_steps, int groups, Policy&& policy) {
234232
[=](nd_item<1> item_id) mutable {
235233
auto global_idx = item_id.get_global_id(0);
236234
// 1. Initialization (transform part).
237-
tf_init(item_id, global_idx, access_buf, num_steps,
238-
temp_buf_local);
235+
tf_init(item_id, global_idx, num_steps,
236+
temp_buf_local, access_buf);
239237
// 2. Reduce within work group
240238
float local_result = brick_reduce(
241239
item_id, global_idx, num_steps, temp_buf_local);
@@ -347,8 +345,8 @@ float calc_pi_dpstd_native4(size_t num_steps, int groups, Policy&& policy) {
347345
auto global_idx = item_id.get_global_id(0);
348346
// 1. Initialization (transform part). Fill local
349347
// memory
350-
tf_init(item_id, global_idx, access_buf, num_steps,
351-
temp_buf_local);
348+
tf_init(item_id, global_idx, num_steps,
349+
temp_buf_local, access_buf);
352350
// 2. Reduce within work group
353351
float local_result = brick_reduce(
354352
item_id, global_idx, num_steps, temp_buf_local);

0 commit comments

Comments
 (0)