@@ -52,22 +52,28 @@ class TimeFrameGPU : public TimeFrame
5252 void initDevice (IndexTableUtils*, const TrackingParameters& trkParam, const TimeFrameGPUParameters&, const int , const int );
5353 void initDeviceSAFitting ();
5454 void loadTrackingFrameInfoDevice (const int );
55- void loadUnsortedClustersDevice ();
56- void loadClustersDevice ();
55+ void loadUnsortedClustersDevice (const int );
56+ void loadClustersDevice (const int );
5757 void loadTrackletsDevice ();
58+ void loadTrackletsLUTDevice ();
5859 void loadCellsDevice ();
59- void loadCellsLUT ();
60+ void loadCellsLUTDevice ();
6061 void loadTrackSeedsDevice ();
6162 void loadTrackSeedsChi2Device ();
6263 void loadRoadsDevice ();
6364 void loadTrackSeedsDevice (std::vector<CellSeed>&);
65+ void createCellsBuffers (const int );
66+ void createCellsDevice ();
67+ void createCellsLUTDevice ();
68+ void createNeighboursDevice ();
6469 void createNeighboursDevice (const unsigned int & layer, std::vector<std::pair<int , int >>& neighbours);
6570 void createNeighboursLUTDevice (const int , const unsigned int );
6671 void createTrackITSExtDevice (std::vector<CellSeed>&);
6772 void downloadTrackITSExtDevice (std::vector<CellSeed>&);
68- void downloadCellsNeighbours (std::vector<std::vector<std::pair<int , int >>>&, const int );
69- void downloadNeighboursLUT (std::vector<int >&, const int );
70- void downloadCellsDevice (const int );
73+ void downloadCellsNeighboursDevice (std::vector<std::vector<std::pair<int , int >>>&, const int );
74+ void downloadNeighboursLUTDevice (std::vector<int >&, const int );
75+ void downloadCellsDevice ();
76+ void downloadCellsLUTDevice ();
7177 void unregisterRest ();
7278 void initDeviceChunks (const int , const int );
7379 template <Task task>
@@ -98,11 +104,11 @@ class TimeFrameGPU : public TimeFrame
98104 int * getDeviceNeighboursLUT (const int layer) { return mNeighboursLUTDevice [layer]; }
99105 gpuPair<int , int >* getDeviceNeighbours (const int layer) { return mNeighboursDevice [layer]; }
100106 TrackingFrameInfo* getDeviceTrackingFrameInfo (const int );
101- // TrackingFrameInfo** getDeviceArrayTrackingFrameInfo() { return mTrackingFrameInfoDeviceArray; }
102107 const TrackingFrameInfo** getDeviceArrayTrackingFrameInfo () const { return mTrackingFrameInfoDeviceArray ; }
103- Cluster** getDeviceArrayClusters () const { return mClustersDeviceArray ; }
104- Cluster** getDeviceArrayUnsortedClusters () const { return mUnsortedClustersDeviceArray ; }
105- Tracklet** getDeviceArrayTracklets () const { return mTrackletsDeviceArray ; }
108+ const Cluster** getDeviceArrayClusters () const { return mClustersDeviceArray ; }
109+ const Cluster** getDeviceArrayUnsortedClusters () const { return mUnsortedClustersDeviceArray ; }
110+ const Tracklet** getDeviceArrayTracklets () const { return mTrackletsDeviceArray ; }
111+ const int ** getDeviceArrayTrackletsLUT () const { return mTrackletsLUTDeviceArray ; }
106112 int ** getDeviceArrayCellsLUT () const { return mCellsLUTDeviceArray ; }
107113 int ** getDeviceArrayNeighboursCellLUT () const { return mNeighboursCellLUTDeviceArray ; }
108114 CellSeed** getDeviceArrayCells () const { return mCellsDeviceArray ; }
@@ -117,13 +123,21 @@ class TimeFrameGPU : public TimeFrame
117123 gsl::span<int > getHostNTracklets (const int chunkId);
118124 gsl::span<int > getHostNCells (const int chunkId);
119125
126+ // Host-available device getters
127+ gsl::span<int *> getDeviceCellLUTs () { return mCellsLUTDevice ; }
128+ gsl::span<CellSeed*> getDeviceCells () { return mCellsDevice ; }
129+ gsl::span<int , nLayers - 2 > getNCellsDevice () { return mNCells ; }
130+
120131 private:
121132 void allocMemAsync (void **, size_t , Stream*, bool ); // Abstract owned and unowned memory allocations
122133 bool mHostRegistered = false ;
123134 std::vector<GpuTimeFrameChunk<nLayers>> mMemChunks ;
124135 TimeFrameGPUParameters mGpuParams ;
125136 StaticTrackingParameters<nLayers> mStaticTrackingParams ;
126137
138+ // Host-available device buffer sizes
139+ std::array<int , nLayers - 2 > mNCells ;
140+
127141 // Device pointers
128142 StaticTrackingParameters<nLayers>* mTrackingParamsDevice ;
129143 IndexTableUtils* mIndexTableUtilsDevice ;
@@ -135,12 +149,15 @@ class TimeFrameGPU : public TimeFrame
135149 // Hybrid pref
136150 std::array<Cluster*, nLayers> mClustersDevice ;
137151 std::array<Cluster*, nLayers> mUnsortedClustersDevice ;
138- Cluster** mClustersDeviceArray ;
139- Cluster** mUnsortedClustersDeviceArray ;
152+ const Cluster** mClustersDeviceArray ;
153+ const Cluster** mUnsortedClustersDeviceArray ;
140154 std::array<Tracklet*, nLayers - 1 > mTrackletsDevice ;
141- Tracklet** mTrackletsDeviceArray ;
155+ const Tracklet** mTrackletsDeviceArray ;
156+ const int ** mTrackletsLUTDeviceArray ;
157+ std::array<int *, nLayers - 2 > mTrackletsLUTDevice ;
142158 std::array<int *, nLayers - 2 > mCellsLUTDevice ;
143159 std::array<int *, nLayers - 3 > mNeighboursLUTDevice ;
160+
144161 int ** mCellsLUTDeviceArray ;
145162 int ** mNeighboursCellDeviceArray ;
146163 int ** mNeighboursCellLUTDeviceArray ;
0 commit comments