Skip to content
Snippets Groups Projects
Commit f90f201a authored by Felix Weiglhofer's avatar Felix Weiglhofer
Browse files

tof::Hitfind: Use OpenMP macros.

parent caa1f8cf
No related branches found
No related tags found
1 merge request!1500tof::Hitfind: Use OpenMP macros.
Pipeline #25687 passed
......@@ -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];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment