Project
Loading...
Searching...
No Matches
TraversalTopology.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.
11
12#ifndef ALICEO2_ITSMFT_TRACKING_TRAVERSALTOPOLOGY_H_
13#define ALICEO2_ITSMFT_TRACKING_TRAVERSALTOPOLOGY_H_
14
15#include <cstdint>
16#include <type_traits>
17
18#ifndef GPUCA_GPUCODE
19#include <optional>
20#include <vector>
22#endif
23
27
28namespace o2::itsmft
29{
30struct IterationParameters;
31}
32
34{
35
36struct Edge {
39};
40
45
54
85
86#ifndef GPUCA_GPUCODE
89 std::vector<LayerId> activeSurfaceList;
92 std::vector<Edge> edges;
93 std::vector<CellPath> paths;
94 std::vector<uint32_t> pathsByFirstEdgeOffsets;
95 std::vector<CellPathId> pathsByFirstEdge;
96 std::vector<CellPathId> scheduledPaths;
97 std::vector<CellPathId> roadStartPaths;
98 std::vector<uint32_t> roadStartComponentOffsets;
99
101 {
102 return {catalog,
103 nLayers,
104 activeSurfaceList.data(), static_cast<uint32_t>(activeSurfaceList.size()),
106 edges.data(), static_cast<uint32_t>(edges.size()),
107 paths.data(), static_cast<uint32_t>(paths.size()),
109 scheduledPaths.data(), static_cast<uint32_t>(scheduledPaths.size()),
110 roadStartPaths.data(), static_cast<uint32_t>(roadStartPaths.size()),
113 }
114};
115
125
127 std::optional<TraversalTopology> topology;
129
130 bool ok() const noexcept { return topology.has_value(); }
131};
132
133// Derive one iteration's topology from the invariant detector layout and the
134// Tracker-owned iteration parameters.
135TraversalTopologyBuildResult deriveTraversalTopology(const DetectorConfiguration& layout,
136 const o2::itsmft::IterationParameters& parameters);
137
138#endif // GPUCA_GPUCODE
139
140static_assert(sizeof(CellPath) == 4);
141static_assert(std::is_standard_layout_v<TraversalTopologyView> && std::is_trivially_copyable_v<TraversalTopologyView>);
142
143} // namespace o2::itsmft::tracking
144
145#endif
unsigned short int uint16_t
GLuint index
Definition glcorearb.h:781
GLint first
Definition glcorearb.h:399
GLsizei const GLuint * paths
Definition glcorearb.h:5475
uint32_t trackClusterIndicesSize noexcept
TraversalTopologyBuildResult deriveTraversalTopology(const DetectorConfiguration &layout, const o2::itsmft::IterationParameters &parameters)
uint32_t getEntriesBound() const noexcept
uint32_t getEntries() const noexcept
uint32_t getFirstEntry() const noexcept
SurfaceCatalogView getSurfaceCatalogView() const noexcept
const SurfaceDescriptor & getSurface(LayerId id) const
TopologyRange getPathsStartingWithEdge(EdgeId edge) const
const CellPath & getPath(CellPathId id) const
std::vector< uint32_t > pathsByFirstEdgeOffsets
TraversalTopologyView getView(SurfaceCatalogView catalog) const noexcept
std::vector< uint32_t > roadStartComponentOffsets
std::vector< CellPathId > pathsByFirstEdge