Project
Loading...
Searching...
No Matches
PrimaryVertexContextGPU.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
15
16#ifndef ITSTRACKINGGPU_PRIMARYVERTEXCONTEXTGPU_H_
17#define ITSTRACKINGGPU_PRIMARYVERTEXCONTEXTGPU_H_
18
19#include <array>
20
21#include <cub/cub.cuh>
22#include <cstdint>
23
27#include "ITStracking/PrimaryVertexContext.h"
28#include "ITStracking/Road.h"
30
31#include "DeviceStoreGPU.h"
32#include "UniquePointer.h"
33
34namespace o2
35{
36namespace its
37{
38
40{
41 public:
44
45 void initialise(const MemoryParameters& memParam, const TrackingParameters& trkParam,
46 const std::vector<std::vector<Cluster>>& cl, const std::array<float, 3>& pv, const int iteration) override;
47
48 gpu::DeviceStoreNV& getDeviceContext();
56 std::array<gpu::Vector<int>, constants::its2::CellsPerRoad>& getTempTableArray();
57 std::array<gpu::Vector<Tracklet>, constants::its2::CellsPerRoad>& getTempTrackletArray();
58 std::array<gpu::Vector<Cell>, constants::its2::CellsPerRoad - 1>& getTempCellArray();
60
61 private:
62 gpu::DeviceStoreNV mGPUContext;
63 gpu::UniquePointer<gpu::DeviceStoreNV> mGPUContextDevicePointer;
64 std::array<gpu::Vector<int>, constants::its2::CellsPerRoad> mTempTableArray;
65 std::array<gpu::Vector<Tracklet>, constants::its2::CellsPerRoad> mTempTrackletArray;
66 std::array<gpu::Vector<Cell>, constants::its2::CellsPerRoad - 1> mTempCellArray;
67};
68
70
71inline gpu::DeviceStoreNV& PrimaryVertexContextNV::getDeviceContext()
72{
73 return *mGPUContextDevicePointer;
74}
75
80
85
90
93{
94 return mGPUContext.getTrackletsPerClusterTable();
95}
96
101
103{
104 return mGPUContext.getCellsLookupTable();
105}
106
109{
110 return mGPUContext.getCellsPerTrackletTable();
111}
112
114{
115 return mTempTableArray;
116}
117
119{
120 return mTempTrackletArray;
121}
122
124{
125 return mTempCellArray;
126}
127
129{
130 mGPUContextDevicePointer = gpu::UniquePointer<gpu::DeviceStoreNV>{mGPUContext};
131}
132
133inline void PrimaryVertexContextNV::initialise(const MemoryParameters& memParam, const TrackingParameters& trkParam,
134 const std::vector<std::vector<Cluster>>& cl, const std::array<float, 3>& pv, const int iteration)
135{
137 // this->PrimaryVertexContext::initialise(memParam, cl, pv, iteration);
138 // mGPUContextDevicePointer = mGPUContext.initialise(mPrimaryVertex, mClusters, mTracklets, mCells, mCellsLookupTable, mMinR, mMaxR);
139}
140
141} // namespace its
142} // namespace o2
143
144#endif
std::array< gpu::Vector< int >, constants::its2::CellsPerRoad > & getTempTableArray()
gpu::Array< gpu::Vector< int >, constants::its2::CellsPerRoad > & getDeviceTrackletsPerClustersTable()
gpu::Array< gpu::Vector< Cluster >, constants::its2::LayersNumber > & getDeviceClusters()
void initialise(const MemoryParameters &memParam, const TrackingParameters &trkParam, const std::vector< std::vector< Cluster > > &cl, const std::array< float, 3 > &pv, const int iteration) override
gpu::Array< gpu::Vector< Cell >, constants::its2::CellsPerRoad > & getDeviceCells()
gpu::Array< gpu::Vector< int >, constants::its2::CellsPerRoad > & getDeviceTrackletsLookupTable()
gpu::Array< gpu::Vector< Tracklet >, constants::its2::TrackletsPerRoad > & getDeviceTracklets()
std::array< gpu::Vector< Cell >, constants::its2::CellsPerRoad - 1 > & getTempCellArray()
gpu::Array< gpu::Vector< int >, constants::its2::CellsPerRoad - 1 > & getDeviceCellsPerTrackletTable()
gpu::Array< gpu::Vector< int >, constants::its2::CellsPerRoad - 1 > & getDeviceCellsLookupTable()
std::array< gpu::Vector< Tracklet >, constants::its2::CellsPerRoad > & getTempTrackletArray()
constexpr int TrackletsPerRoad
Definition Constants.h:64
constexpr int CellsPerRoad
Definition Constants.h:65
constexpr int LayersNumber
Definition Constants.h:63
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...