From f90f201a6627841a1be5bc546deaf8b81091cb8d Mon Sep 17 00:00:00 2001 From: Felix Weiglhofer <weiglhofer@fias.uni-frankfurt.de> Date: Tue, 14 Nov 2023 17:18:47 +0000 Subject: [PATCH] tof::Hitfind: Use OpenMP macros. --- algo/detectors/tof/Hitfind.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/algo/detectors/tof/Hitfind.cxx b/algo/detectors/tof/Hitfind.cxx index be317d82f9..824630044e 100644 --- a/algo/detectors/tof/Hitfind.cxx +++ b/algo/detectors/tof/Hitfind.cxx @@ -109,12 +109,13 @@ namespace cbm::algo::tof xpu::push_timer("TofHitfind"); xpu::t_add_bytes(digiIn.size_bytes()); -#pragma omp parallel + + CBM_PARALLEL() { const int ithread = openmp::GetThreadNum(); const int nthreads = openmp::GetNumThreads(); -#pragma omp single + CBM_OMP(single) { cluPrefix.resize(nthreads + 1); sizePrefix.resize(nthreads + 1); @@ -124,7 +125,7 @@ namespace cbm::algo::tof auto [clusters, sizes, addresses, indices] = Clusterizer::resultType(); -#pragma omp for schedule(dynamic) nowait + CBM_OMP(for schedule(dynamic) nowait) for (uint32_t iRpc = 0; iRpc < fAlgo.size(); iRpc++) { // Get digis @@ -154,9 +155,9 @@ namespace cbm::algo::tof sizePrefix[ithread + 1] = sizes.size(); addrPrefix[ithread + 1] = addresses.size(); indPrefix[ithread + 1] = indices.size(); -#pragma omp barrier + CBM_OMP(barrier) -#pragma omp single + CBM_OMP(single) { for (int i = 1; i < (nthreads + 1); i++) { cluPrefix[i] += cluPrefix[i - 1]; -- GitLab