5858#include " SimulationDataFormat/MCCompLabel.h"
5959#endif
6060
61+ namespace o2 ::gpu::internal
62+ {
63+ }
6164using namespace o2 ::gpu;
65+ using namespace o2 ::gpu::internal;
6266using namespace o2 ::tpc;
6367using namespace gputpcgmmergertypes ;
6468
6569static constexpr int32_t kMaxParts = 400 ;
6670static constexpr int32_t kMaxClusters = GPUCA_MERGER_MAX_TRACK_CLUSTERS;
6771
68- namespace o2 ::gpu
72+ namespace o2 ::gpu::internal
6973{
7074struct MergeLooperParam {
7175 float refz;
7276 float x;
7377 float y;
7478 uint32_t id;
7579};
76- } // namespace o2::gpu
80+ } // namespace o2::gpu::internal
7781
7882#ifndef GPUCA_GPUCODE
7983
@@ -741,6 +745,10 @@ GPUd() void GPUTPCGMMerger::MergeBorderTracks<1>(int32_t nBlocks, int32_t nThrea
741745}
742746
743747#if defined(GPUCA_SPECIALIZE_THRUST_SORTS) && !defined(GPUCA_GPUCODE_COMPILEKERNELS) // Specialize MergeBorderTracks<3>
748+ namespace o2 ::gpu::internal
749+ {
750+ namespace // anonymous
751+ {
744752struct MergeBorderTracks_compMax {
745753 GPUd () bool operator ()(const GPUTPCGMBorderRange& a, const GPUTPCGMBorderRange& b)
746754 {
@@ -761,6 +769,8 @@ struct MergeBorderTracks_compMin {
761769#endif
762770 }
763771};
772+ } // anonymous namespace
773+ } // namespace o2::gpu::internal
764774
765775template <>
766776inline void GPUCA_KRNL_BACKEND_CLASS::runKernelBackendInternal<GPUTPCGMMergerMergeBorders, 3 >(const krnlSetupTime& _xyz, GPUTPCGMBorderRange* const & range, int32_t const & N, int32_t const & cmpMax)
@@ -1436,6 +1446,10 @@ GPUd() void GPUTPCGMMerger::MergeCE(int32_t nBlocks, int32_t nThreads, int32_t i
14361446 // for (int32_t i = 0;i < mMemory->nOutputTracks;i++) {if (mOutputTracks[i].CCE() == false) {mOutputTracks[i].SetNClusters(0);mOutputTracks[i].SetOK(false);}} //Remove all non-CE tracks
14371447}
14381448
1449+ namespace o2 ::gpu::internal
1450+ {
1451+ namespace // anonymous
1452+ {
14391453struct GPUTPCGMMerger_CompareClusterIdsLooper {
14401454 struct clcomparestruct {
14411455 uint8_t leg;
@@ -1489,6 +1503,8 @@ struct GPUTPCGMMerger_CompareClusterIds {
14891503#endif
14901504 }
14911505};
1506+ } // anonymous namespace
1507+ } // namespace o2::gpu::internal
14921508
14931509GPUd () void GPUTPCGMMerger::CollectMergedTracks(int32_t nBlocks, int32_t nThreads, int32_t iBlock, int32_t iThread)
14941510{
@@ -1803,6 +1819,10 @@ GPUd() void GPUTPCGMMerger::PrepareClustersForFit0(int32_t nBlocks, int32_t nThr
18031819}
18041820
18051821#if defined(GPUCA_SPECIALIZE_THRUST_SORTS) && !defined(GPUCA_GPUCODE_COMPILEKERNELS) // Specialize GPUTPCGMMergerSortTracks and GPUTPCGMMergerSortTracksQPt
1822+ namespace o2 ::gpu::internal
1823+ {
1824+ namespace // anonymous
1825+ {
18061826struct GPUTPCGMMergerSortTracks_comp {
18071827 const GPUTPCGMMergedTrack* const mCmp ;
18081828 GPUhd () GPUTPCGMMergerSortTracks_comp(GPUTPCGMMergedTrack* cmp) : mCmp (cmp) {}
@@ -1833,14 +1853,6 @@ struct GPUTPCGMMergerSortTracks_comp {
18331853 }
18341854};
18351855
1836- template <>
1837- inline void GPUCA_KRNL_BACKEND_CLASS::runKernelBackendInternal<GPUTPCGMMergerSortTracks, 0 >(const krnlSetupTime& _xyz)
1838- {
1839- thrust::device_ptr<uint32_t > trackSort ((uint32_t *)mProcessorsShadow ->tpcMerger .TrackOrderProcess ());
1840- ThrustVolatileAsyncAllocator alloc (this );
1841- thrust::sort (GPUCA_THRUST_NAMESPACE::par (alloc).on (mInternals ->Streams [_xyz.x .stream ]), trackSort, trackSort + processors ()->tpcMerger .NOutputTracks (), GPUTPCGMMergerSortTracks_comp (mProcessorsShadow ->tpcMerger .OutputTracks ()));
1842- }
1843-
18441856struct GPUTPCGMMergerSortTracksQPt_comp {
18451857 const GPUTPCGMMergedTrack* const mCmp ;
18461858 GPUhd () GPUTPCGMMergerSortTracksQPt_comp(GPUTPCGMMergedTrack* cmp) : mCmp (cmp) {}
@@ -1861,6 +1873,16 @@ struct GPUTPCGMMergerSortTracksQPt_comp {
18611873#endif
18621874 }
18631875};
1876+ } // anonymous namespace
1877+ } // namespace o2::gpu::internal
1878+
1879+ template <>
1880+ inline void GPUCA_KRNL_BACKEND_CLASS::runKernelBackendInternal<GPUTPCGMMergerSortTracks, 0 >(const krnlSetupTime& _xyz)
1881+ {
1882+ thrust::device_ptr<uint32_t > trackSort ((uint32_t *)mProcessorsShadow ->tpcMerger .TrackOrderProcess ());
1883+ ThrustVolatileAsyncAllocator alloc (this );
1884+ thrust::sort (GPUCA_THRUST_NAMESPACE::par (alloc).on (mInternals ->Streams [_xyz.x .stream ]), trackSort, trackSort + processors ()->tpcMerger .NOutputTracks (), GPUTPCGMMergerSortTracks_comp (mProcessorsShadow ->tpcMerger .OutputTracks ()));
1885+ }
18641886
18651887template <>
18661888inline void GPUCA_KRNL_BACKEND_CLASS::runKernelBackendInternal<GPUTPCGMMergerSortTracksQPt, 0 >(const krnlSetupTime& _xyz)
@@ -2074,12 +2096,18 @@ GPUd() void GPUTPCGMMerger::MergeLoopersSort(int32_t nBlocks, int32_t nThreads,
20742096}
20752097
20762098#if defined(GPUCA_SPECIALIZE_THRUST_SORTS) && !defined(GPUCA_GPUCODE_COMPILEKERNELS) // Specialize GPUTPCGMMergerSortTracks and GPUTPCGMMergerSortTracksQPt
2099+ namespace o2 ::gpu::internal
2100+ {
2101+ namespace // anonymous
2102+ {
20772103struct GPUTPCGMMergerMergeLoopers_comp {
20782104 GPUd () bool operator ()(const MergeLooperParam& a, const MergeLooperParam& b)
20792105 {
20802106 return CAMath::Abs (a.refz ) < CAMath::Abs (b.refz );
20812107 }
20822108};
2109+ } // anonymous namespace
2110+ } // namespace o2::gpu::internal
20832111
20842112template <>
20852113inline void GPUCA_KRNL_BACKEND_CLASS::runKernelBackendInternal<GPUTPCGMMergerMergeLoopers, 1 >(const krnlSetupTime& _xyz)
0 commit comments