Skip to content

Commit 9297c52

Browse files
martenoledavidrohr
authored andcommitted
Include guards for OpenMP
1 parent ccd86e0 commit 9297c52

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Detectors/TRD/workflow/src/TRDTrapSimulatorSpec.cxx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
#include <chrono>
1414
#include <optional>
1515
#include <gsl/span>
16+
17+
#ifdef WITH_OPENMP
1618
#include <omp.h>
19+
#endif
1720

1821
#include "TFile.h"
1922

@@ -233,7 +236,9 @@ void TRDDPLTrapSimulatorTask::run(o2::framework::ProcessingContext& pc)
233236

234237
auto timeParallelStart = std::chrono::high_resolution_clock::now();
235238

239+
#ifdef WITH_OPENMP
236240
#pragma omp parallel for
241+
#endif
237242
for (int iTrig = 0; iTrig < triggerRecords.size(); ++iTrig) {
238243
int currHCId = -1;
239244
std::array<TrapSimulator, NMCMHCMAX> trapSimulators{}; //the up to 64 trap simulators for a single half chamber

0 commit comments

Comments
 (0)