Skip to content

Commit 5bc7685

Browse files
committed
DO NOT COMMIT
Signed-off-by: Felix Schlepper <felix.schlepper@cern.ch>
1 parent 347017b commit 5bc7685

3 files changed

Lines changed: 90 additions & 21 deletions

File tree

Detectors/ITSMFT/ITS/tracking/GPU/ITStrackingGPU/TrackingKernels.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,28 @@ void processNeighboursHandler(const int startLevel,
197197
const o2::base::PropagatorF::MatCorrType matCorrType,
198198
o2::its::ExternalAllocator* alloc);
199199

200+
void processNeighboursHandler7(const int startLevel,
201+
const int defaultCellTopologyId,
202+
CellSeed** allCellSeeds,
203+
CellSeed* currentCellSeeds,
204+
const int* currentCellTopologyIds,
205+
const int* currentCellIds,
206+
std::array<int, TrackingTopology<7>::MaxCells>& nCells,
207+
const unsigned char** usedClusters,
208+
CellNeighbour** neighbours,
209+
int** neighboursDeviceLUTs,
210+
const TrackingFrameInfo** foundTrackingFrameInfo,
211+
bounded_vector<TrackSeed<7>>& seedsHost,
212+
const float bz,
213+
const float MaxChi2ClusterAttachment,
214+
const float maxChi2NDF,
215+
const int maxHoles,
216+
const LayerMask holeLayerMask,
217+
const std::vector<float>& layerxX0Host,
218+
const o2::base::Propagator* propagator,
219+
const o2::base::PropagatorF::MatCorrType matCorrType,
220+
o2::its::ExternalAllocator* alloc);
221+
200222
template <int NLayers>
201223
void countTrackSeedHandler(TrackSeed<NLayers>* trackSeeds,
202224
const TrackingFrameInfo** foundTrackingFrameInfo,

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackerTraitsGPU.cxx

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -313,27 +313,29 @@ void TrackerTraitsGPU<NLayers>::findRoads(const int iteration)
313313
mTimeFrameGPU->getNCells()[startCellTopologyId] == 0) {
314314
continue;
315315
}
316-
processNeighboursHandler<NLayers>(startLevel,
317-
startCellTopologyId,
318-
mTimeFrameGPU->getDeviceArrayCells(),
319-
mTimeFrameGPU->getDeviceCells()[startCellTopologyId],
320-
nullptr,
321-
nullptr,
322-
mTimeFrameGPU->getArrayNCells(),
323-
(const uint8_t**)mTimeFrameGPU->getDeviceArrayUsedClusters(),
324-
mTimeFrameGPU->getDeviceArrayNeighbours(),
325-
mTimeFrameGPU->getDeviceArrayNeighboursCellLUT(),
326-
mTimeFrameGPU->getDeviceArrayTrackingFrameInfo(),
327-
trackSeeds,
328-
this->mBz,
329-
this->mTrkParams[iteration].MaxChi2ClusterAttachment,
330-
this->mTrkParams[iteration].MaxChi2NDF,
331-
this->mTrkParams[iteration].MaxHoles,
332-
this->mTrkParams[iteration].HoleLayerMask,
333-
this->mTrkParams[iteration].LayerxX0,
334-
mTimeFrameGPU->getDevicePropagator(),
335-
this->mTrkParams[iteration].CorrType,
336-
mTimeFrameGPU->getFrameworkAllocator());
316+
if constexpr (NLayers == 7) {
317+
processNeighboursHandler7(startLevel,
318+
startCellTopologyId,
319+
mTimeFrameGPU->getDeviceArrayCells(),
320+
mTimeFrameGPU->getDeviceCells()[startCellTopologyId],
321+
nullptr,
322+
nullptr,
323+
mTimeFrameGPU->getArrayNCells(),
324+
(const uint8_t**)mTimeFrameGPU->getDeviceArrayUsedClusters(),
325+
mTimeFrameGPU->getDeviceArrayNeighbours(),
326+
mTimeFrameGPU->getDeviceArrayNeighboursCellLUT(),
327+
mTimeFrameGPU->getDeviceArrayTrackingFrameInfo(),
328+
trackSeeds,
329+
this->mBz,
330+
this->mTrkParams[iteration].MaxChi2ClusterAttachment,
331+
this->mTrkParams[iteration].MaxChi2NDF,
332+
this->mTrkParams[iteration].MaxHoles,
333+
this->mTrkParams[iteration].HoleLayerMask,
334+
this->mTrkParams[iteration].LayerxX0,
335+
mTimeFrameGPU->getDevicePropagator(),
336+
this->mTrkParams[iteration].CorrType,
337+
mTimeFrameGPU->getFrameworkAllocator());
338+
}
337339
}
338340
// fixme: I don't want to move tracks back and forth, but I need a way to use a thrust::allocator that is aware of our managed memory.
339341
if (trackSeeds.empty()) {

Detectors/ITSMFT/ITS/tracking/GPU/cuda/TrackingKernels.cu

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,51 @@ void processNeighboursHandler(const int startLevel,
10281028
alloc->popTagOffStack(Tag);
10291029
}
10301030

1031+
void processNeighboursHandler7(const int startLevel,
1032+
const int defaultCellTopologyId,
1033+
CellSeed** allCellSeeds,
1034+
CellSeed* currentCellSeeds,
1035+
const int* currentCellTopologyIds,
1036+
const int* currentCellIds,
1037+
std::array<int, TrackingTopology<7>::MaxCells>& nCells,
1038+
const unsigned char** usedClusters,
1039+
CellNeighbour** neighbours,
1040+
int** neighboursDeviceLUTs,
1041+
const TrackingFrameInfo** foundTrackingFrameInfo,
1042+
bounded_vector<TrackSeed<7>>& seedsHost,
1043+
const float bz,
1044+
const float maxChi2ClusterAttachment,
1045+
const float maxChi2NDF,
1046+
const int maxHoles,
1047+
const LayerMask holeLayerMask,
1048+
const std::vector<float>& layerxX0Host,
1049+
const o2::base::Propagator* propagator,
1050+
const o2::base::PropagatorF::MatCorrType matCorrType,
1051+
o2::its::ExternalAllocator* alloc)
1052+
{
1053+
processNeighboursHandler<7>(startLevel,
1054+
defaultCellTopologyId,
1055+
allCellSeeds,
1056+
currentCellSeeds,
1057+
currentCellTopologyIds,
1058+
currentCellIds,
1059+
nCells,
1060+
usedClusters,
1061+
neighbours,
1062+
neighboursDeviceLUTs,
1063+
foundTrackingFrameInfo,
1064+
seedsHost,
1065+
bz,
1066+
maxChi2ClusterAttachment,
1067+
maxChi2NDF,
1068+
maxHoles,
1069+
holeLayerMask,
1070+
layerxX0Host,
1071+
propagator,
1072+
matCorrType,
1073+
alloc);
1074+
}
1075+
10311076
template <int NLayers>
10321077
void countTrackSeedHandler(TrackSeed<NLayers>* trackSeeds,
10331078
const TrackingFrameInfo** foundTrackingFrameInfo,

0 commit comments

Comments
 (0)