13#ifndef TRACKINGITSGPU_INCLUDE_TIMEFRAMEGPU_H
14#define TRACKINGITSGPU_INCLUDE_TIMEFRAMEGPU_H
106 virtual
bool isGPU() const noexcept final {
return true; }
107 virtual const char*
getName() const noexcept {
return "GPU"; }
168 void allocMemAsync(
void**,
size_t,
Stream&,
bool, int32_t =
o2::gpu::GPUMemoryResource::MEMORY_GPU);
169 void allocMem(
void**,
size_t,
bool, int32_t =
o2::gpu::GPUMemoryResource::MEMORY_GPU);
172 std::
array<
int, NLayers - 1> mNTracklets;
173 std::
array<
int, NLayers - 2> mNCells;
174 std::
array<
int, NLayers - 3> mNNeighbours;
184 Vertex* mPrimaryVerticesDevice;
185 int* mROFramesPVDevice;
188 std::
array<
int*, NLayers> mClustersIndexTablesDevice;
189 std::
array<
unsigned char*, NLayers> mUsedClustersDevice;
190 std::
array<
int*, NLayers> mROFramesClustersDevice;
191 const
Cluster** mClustersDeviceArray;
192 const
Cluster** mUnsortedClustersDeviceArray;
193 const
int** mClustersIndexTablesDeviceArray;
194 uint8_t** mUsedClustersDeviceArray;
195 const
int** mROFramesClustersDeviceArray;
197 std::
array<
int*, NLayers - 1> mTrackletsLUTDevice;
198 std::
array<
int*, NLayers - 2> mCellsLUTDevice;
199 std::
array<
int*, NLayers - 3> mNeighboursLUTDevice;
201 Tracklet** mTrackletsDeviceArray{
nullptr};
202 int** mCellsLUTDeviceArray{
nullptr};
203 int** mNeighboursCellDeviceArray{
nullptr};
204 int** mNeighboursCellLUTDeviceArray{
nullptr};
205 int** mTrackletsLUTDeviceArray{
nullptr};
206 std::array<CellSeed*, NLayers - 2> mCellsDevice;
207 CellSeed** mCellsDeviceArray;
208 std::array<
int*, NLayers - 3> mNeighboursIndexTablesDevice;
210 int* mTrackSeedsLUTDevice{
nullptr};
211 unsigned int mNTracks{0};
214 std::array<
float*, NLayers - 2> mCellSeedsChi2Device;
215 float** mCellSeedsChi2DeviceArray;
217 TrackITSExt* mTrackITSExtDevice;
218 std::array<gpuPair<int, int>*, NLayers - 2> mNeighbourPairsDevice;
219 std::array<
int*, NLayers - 2> mNeighboursDevice;
220 std::array<TrackingFrameInfo*, NLayers> mTrackingFrameInfoDevice;
221 const TrackingFrameInfo** mTrackingFrameInfoDeviceArray;
225 std::bitset<NLayers + 1> mPinnedUnsortedClusters{0};
226 std::bitset<NLayers + 1> mPinnedClusters{0};
227 std::bitset<NLayers + 1> mPinnedClustersIndexTables{0};
228 std::bitset<NLayers + 1> mPinnedUsedClusters{0};
229 std::bitset<NLayers + 1> mPinnedROFramesClusters{0};
230 std::bitset<NLayers + 1> mPinnedTrackingFrameInfo{0};
233 bounded_vector<TrackITSExt> mTrackITSExt;
236template <
int NLayers>
239 std::vector<unsigned int>
sizes(this->mUnsortedClusters.size());
240 std::transform(this->mUnsortedClusters.begin(), this->mUnsortedClusters.end(),
sizes.begin(),
241 [](
const auto&
v) { return static_cast<unsigned int>(v.size()); });
245template <
int NLayers>
248 return std::accumulate(mNTracklets.begin(), mNTracklets.end(), 0);
251template <
int NLayers>
254 return std::accumulate(mNCells.begin(), mNCells.end(), 0);
257template <
int NLayers>
260 return std::accumulate(mNNeighbours.begin(), mNNeighbours.end(), 0);
CellSeed: connections of three clusters.
void loadTrackletsDevice()
gsl::span< Tracklet * > getDeviceTracklets()
size_t getNumberOfTracklets() const final
o2::track::TrackParCovF ** getDeviceArrayTrackSeeds()
void loadTrackletsLUTDevice()
virtual bool isGPU() const noexcept final
interface
std::array< int *, NLayers - 2 > & getDeviceNeighboursAll()
void downloadTrackITSExtDevice()
int * getDeviceROFramesClusters(const int layer)
void createNeighboursIndexTablesDevice(const int)
void createUsedClustersDevice(const int, const int)
void createUnsortedClustersDeviceArray(const int, const int=NLayers)
~TimeFrameGPU() final=default
void loadROFrameClustersDevice(const int, const int)
void pushMemoryStack(const int)
Most relevant operations.
int * getDeviceNeighbours(const int layer)
void downloadNeighboursLUTDevice(bounded_vector< int > &, const int)
void downloadCellsLUTDevice()
const auto getDeviceROFOverlapTableView()
void loadROFVertexLookupTable(const int)
void loadCellsLUTDevice()
TrackITSExt * getDeviceTrackITSExt()
TrackSeedN * getDeviceTrackSeeds()
void loadTrackSeedsDevice()
auto & getArrayNNeighbours()
gsl::span< int, NLayers - 2 > getNCells()
void loadROFOverlapTable(const int)
void unregisterHostMemory(const int)
const auto getDeviceROFMaskTableView()
unsigned char * getDeviceUsedClusters(const int)
float ** getDeviceArrayTrackSeedsChi2()
virtual void wipe() final
cleanup
void loadClustersIndexTables(const int, const int)
size_t getNumberOfNeighbours() const final
uint8_t ** getDeviceArrayUsedClusters() const
const int ** getDeviceArrayClustersIndexTables() const
void createTrackletsLUTDeviceArray(const int)
void registerHostMemory(const int)
void recordEvent(const int)
int ** getDeviceArrayCellsLUT() const
auto getNTrackSeeds() const
CellSeed ** getDeviceArrayCells()
gsl::span< CellSeed * > getDeviceCells()
Vertex * getDeviceVertices()
void waitEvent(const int, const int)
gsl::span< int * > getDeviceTrackletsLUTs()
void popMemoryStack(const int)
void createClustersIndexTablesArray(const int)
gpuPair< int, int > * getDeviceNeighbourPairs(const int layer)
void syncStreams(const bool=true)
void createTrackletsBuffers(const int)
int * getDeviceNeighboursLUT(const int layer)
void loadUnsortedClustersDevice(const int, const int)
const int ** getDeviceROFrameClusters() const
void loadTrackingFrameInfoDevice(const int, const int)
void createNeighboursDevice(const unsigned int layer)
int * getDeviceTrackSeedsLUT()
int * getDeviceROFramesPV()
void initialise(const int, const TrackingParameters &, const int)
int * getDeviceNeighboursIndexTables(const int layer)
const auto getDeviceROFVertexLookupTableView()
Tracklet ** getDeviceArrayTracklets()
size_t getNumberOfCells() const final
auto & getStream(const size_t stream)
synchronization
void loadTrackSeedsChi2Device()
void createTrackingFrameInfoDeviceArray(const int)
void downloadCellsNeighboursDevice(std::vector< bounded_vector< std::pair< int, int > > > &, const int)
void createCellsLUTDeviceArray(const int)
gsl::span< int, NLayers - 3 > getNNeighbours()
void loadROFCutMask(const int)
void createCellsLUTDevice(const int)
void syncStream(const size_t stream)
void loadClustersDevice(const int, const int)
const Cluster ** getDeviceArrayUnsortedClusters() const
gsl::span< int * > getDeviceNeighboursLUTs()
virtual const char * getName() const noexcept
void createCellsBuffersArray(const int)
void loadVertices(const int)
void setDevicePropagator(const o2::base::PropagatorImpl< float > *p) final
int ** getDeviceArrayTrackletsLUT() const
int ** getDeviceArrayNeighboursCellLUT() const
const o2::base::Propagator * getChainPropagator()
const Cluster ** getDeviceArrayClusters() const
void recordEvents(const int=0, const int=NLayers)
void createUsedClustersDeviceArray(const int, const int=NLayers)
const TrackingFrameInfo ** getDeviceArrayTrackingFrameInfo() const
IndexTableUtilsN * getDeviceIndexTableUtils()
void createNeighboursLUTDevice(const int, const unsigned int)
int ** getDeviceNeighboursArray()
void loadIndexTableUtils(const int)
void loadUsedClustersDevice()
void createTrackletsBuffersArray(const int)
gsl::span< int * > getDeviceCellLUTs()
void downloadCellsDevice()
void createClustersDeviceArray(const int, const int=NLayers)
void createTrackletsLUTDevice(const int, const int)
TrackingFrameInfo * getDeviceTrackingFrameInfo(const int)
void createCellsBuffers(const int)
void createROFrameClustersDeviceArray(const int)
void createTrackITSExtDevice(const size_t)
std::vector< unsigned int > getClusterSizes()
gsl::span< int, NLayers - 1 > getNTracklets()
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
GLenum GLuint GLint GLint layer
std::pair< T1, T2 > gpuPair
std::pmr::vector< T > bounded_vector
TrackParametrizationWithError< float > TrackParCovF
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
ROFVertexLookupTable< NLayers > ROFVertexLookupTableN
TrackSeed< NLayers > TrackSeedN
void updateROFVertexLookupTable()
IndexTableUtils< NLayers > IndexTableUtilsN
const o2::base::PropagatorImpl< float > * mPropagatorDevice
ROFOverlapTable< NLayers > ROFOverlapTableN
ROFMaskTable< NLayers > ROFMaskTableN