Skip to content

Commit ec98cae

Browse files
committed
Switch to using tbb::parallel_reduce on all platforms.
1 parent bba01ef commit ec98cae

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

cpp/open3d/t/pipelines/kernel/RegistrationCPU.cpp

-8
Original file line numberDiff line numberDiff line change
@@ -262,18 +262,12 @@ static void ComputePoseDopplerICPKernelCPU(
262262
// and 28th as inlier_count.
263263
std::vector<scalar_t> A_1x29(29, 0.0);
264264

265-
#ifdef _WIN32
266265
std::vector<scalar_t> zeros_29(29, 0.0);
267266
A_1x29 = tbb::parallel_reduce(
268267
tbb::blocked_range<int>(0, n), zeros_29,
269268
[&](tbb::blocked_range<int> r, std::vector<scalar_t> A_reduction) {
270269
for (int workload_idx = r.begin(); workload_idx < r.end();
271270
++workload_idx) {
272-
#else
273-
scalar_t *A_reduction = A_1x29.data();
274-
#pragma omp parallel for reduction(+ : A_reduction[:29]) schedule(static) num_threads(utility::EstimateMaxThreads())
275-
for (int workload_idx = 0; workload_idx < n; ++workload_idx) {
276-
#endif
277271
scalar_t J_G[6] = {0}, J_D[6] = {0};
278272
scalar_t r_G = 0, r_D = 0;
279273

@@ -306,7 +300,6 @@ static void ComputePoseDopplerICPKernelCPU(
306300
A_reduction[28] += 1;
307301
}
308302
}
309-
#ifdef _WIN32
310303
return A_reduction;
311304
},
312305
// TBB: Defining reduction operation.
@@ -317,7 +310,6 @@ static void ComputePoseDopplerICPKernelCPU(
317310
}
318311
return result;
319312
});
320-
#endif
321313

322314
for (int i = 0; i < 29; ++i) {
323315
global_sum[i] = A_1x29[i];

0 commit comments

Comments
 (0)