|
12 | 12 | /// \file TrackerTraits.cxx |
13 | 13 | /// \brief |
14 | 14 | /// |
15 | | - |
16 | | -#include "ITStracking/TrackerTraits.h" |
17 | | -#include <oneapi/tbb/parallel_sort.h> |
18 | | - |
19 | 15 | #include <algorithm> |
20 | 16 | #include <cassert> |
21 | 17 | #include <iostream> |
22 | | -#include "ITStracking/BoundedAllocator.h" |
23 | 18 |
|
24 | 19 | #ifdef OPTIMISATION_OUTPUT |
25 | 20 | #include <format> |
26 | 21 | #endif |
27 | 22 |
|
| 23 | +#include <oneapi/tbb/combinable.h> |
| 24 | +#include <oneapi/tbb/parallel_sort.h> |
| 25 | + |
28 | 26 | #include "CommonConstants/MathConstants.h" |
29 | 27 | #include "DetectorsBase/Propagator.h" |
30 | 28 | #include "GPUCommonMath.h" |
31 | 29 | #include "ITStracking/Cell.h" |
32 | 30 | #include "ITStracking/Constants.h" |
| 31 | +#include "ITStracking/TrackerTraits.h" |
| 32 | +#include "ITStracking/BoundedAllocator.h" |
33 | 33 | #include "ITStracking/IndexTableUtils.h" |
34 | 34 | #include "ITStracking/Tracklet.h" |
35 | 35 | #include "ReconstructionDataFormats/Track.h" |
@@ -80,8 +80,8 @@ void TrackerTraits<nLayers>::computeLayerTracklets(const int iteration, int iROF |
80 | 80 | mTaskArena.execute([&] { |
81 | 81 | tbb::parallel_for( |
82 | 82 | tbb::blocked_range<int>(0, mTrkParams[iteration].TrackletsPerRoad()), |
83 | | - [&](const tbb::blocked_range<int>& layers) { |
84 | | - for (int iLayer = layers.begin(); iLayer < layers.end(); ++iLayer) { |
| 83 | + [&](const tbb::blocked_range<int>& Layers) { |
| 84 | + for (int iLayer = Layers.begin(); iLayer < Layers.end(); ++iLayer) { |
85 | 85 | gsl::span<const Cluster> layer0 = mTimeFrame->getClustersOnLayer(rof0, iLayer); |
86 | 86 | if (layer0.empty()) { |
87 | 87 | continue; |
@@ -209,8 +209,8 @@ void TrackerTraits<nLayers>::computeLayerTracklets(const int iteration, int iROF |
209 | 209 | mTaskArena.execute([&] { |
210 | 210 | tbb::parallel_for( |
211 | 211 | tbb::blocked_range<int>(0, mTrkParams[iteration].CellsPerRoad()), |
212 | | - [&](const tbb::blocked_range<int>& layers) { |
213 | | - for (int iLayer = layers.begin(); iLayer < layers.end(); ++iLayer) { |
| 212 | + [&](const tbb::blocked_range<int>& Layers) { |
| 213 | + for (int iLayer = Layers.begin(); iLayer < Layers.end(); ++iLayer) { |
214 | 214 | /// Sort tracklets |
215 | 215 | auto& trkl{mTimeFrame->getTracklets()[iLayer + 1]}; |
216 | 216 | tbb::parallel_sort(trkl.begin(), trkl.end(), sortTracklets); |
@@ -282,8 +282,8 @@ void TrackerTraits<nLayers>::computeLayerCells(const int iteration) |
282 | 282 | mTaskArena.execute([&] { |
283 | 283 | tbb::parallel_for( |
284 | 284 | tbb::blocked_range<int>(0, mTrkParams[iteration].CellsPerRoad()), |
285 | | - [&](const tbb::blocked_range<int>& layers) { |
286 | | - for (int iLayer = layers.begin(); iLayer < layers.end(); ++iLayer) { |
| 285 | + [&](const tbb::blocked_range<int>& Layers) { |
| 286 | + for (int iLayer = Layers.begin(); iLayer < Layers.end(); ++iLayer) { |
287 | 287 |
|
288 | 288 | if (mTimeFrame->getTracklets()[iLayer + 1].empty() || |
289 | 289 | mTimeFrame->getTracklets()[iLayer].empty()) { |
@@ -579,11 +579,11 @@ template <int nLayers> |
579 | 579 | void TrackerTraits<nLayers>::findRoads(const int iteration) |
580 | 580 | { |
581 | 581 | CA_DEBUGGER(std::cout << "Finding roads, iteration " << iteration << std::endl); |
| 582 | + |
582 | 583 | for (int startLevel{mTrkParams[iteration].CellsPerRoad()}; startLevel >= mTrkParams[iteration].CellMinimumLevel(); --startLevel) { |
583 | 584 | CA_DEBUGGER(std::cout << "\t > Processing level " << startLevel << std::endl); |
584 | | - const int minimumLayer{startLevel - 1}; |
585 | 585 | bounded_vector<CellSeed> trackSeeds(mMemoryPool.get()); |
586 | | - for (int startLayer{mTrkParams[iteration].CellsPerRoad() - 1}; startLayer >= minimumLayer; --startLayer) { |
| 586 | + for (int startLayer{mTrkParams[iteration].CellsPerRoad() - 1}; startLayer >= startLevel - 1; --startLayer) { |
587 | 587 | if ((mTrkParams[iteration].StartLayerMask & (1 << (startLayer + 2))) == 0) { |
588 | 588 | continue; |
589 | 589 | } |
|
0 commit comments