forked from cms-sw/cmssw
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCAStructures.h
55 lines (41 loc) · 2.46 KB
/
CAStructures.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#ifndef RecoPixelVertexing_PixelTriplets_CAStructures_h
#define RecoPixelVertexing_PixelTriplets_CAStructures_h
#include "HeterogeneousCore/CUDAUtilities/interface/SimpleVector.h"
#include "HeterogeneousCore/CUDAUtilities/interface/VecArray.h"
#include "HeterogeneousCore/CUDAUtilities/interface/HistoContainer.h"
namespace caStructures {
// types
// using typename TrackerTraits::hindex_type = uint32_t; // FIXME from siPixelRecHitsHeterogeneousProduct
// using typename TrackerTraits::tindex_type = uint32_t; // for tuples
// using typename TrackerTraits::cindex_type = uint32_t; // for cells
template <typename TrackerTraits>
using CellNeighborsT = cms::cuda::VecArray<typename TrackerTraits::cindex_type, TrackerTraits::maxCellNeighbors>;
template <typename TrackerTraits>
using CellTracksT = cms::cuda::VecArray<typename TrackerTraits::tindex_type, TrackerTraits::maxCellTracks>;
template <typename TrackerTraits>
using CellNeighborsVectorT = cms::cuda::SimpleVector<CellNeighborsT<TrackerTraits>>;
template <typename TrackerTraits>
using CellTracksVectorT = cms::cuda::SimpleVector<CellTracksT<TrackerTraits>>;
template <typename TrackerTraits>
using OuterHitOfCellContainerT = cms::cuda::VecArray<uint32_t, TrackerTraits::maxCellsPerHit>;
template <typename TrackerTraits>
using TupleMultiplicityT = cms::cuda::OneToManyAssoc<typename TrackerTraits::tindex_type,
TrackerTraits::maxHitsOnTrack + 1,
TrackerTraits::maxNumberOfTuples>;
template <typename TrackerTraits>
using HitToTupleT = cms::cuda::OneToManyAssoc<typename TrackerTraits::tindex_type,
-1,
TrackerTraits::maxHitsForContainers>; // 3.5 should be enough
template <typename TrackerTraits>
using TuplesContainerT = cms::cuda::OneToManyAssoc<typename TrackerTraits::hindex_type,
TrackerTraits::maxNumberOfTuples,
TrackerTraits::maxHitsForContainers>;
template <typename TrackerTraits>
struct OuterHitOfCellT {
OuterHitOfCellContainerT<TrackerTraits>* container;
int32_t offset;
constexpr auto& operator[](int i) { return container[i - offset]; }
constexpr auto const& operator[](int i) const { return container[i - offset]; }
};
} // namespace caStructures
#endif