Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-27 07:23:58

0001 // This file is part of the ACTS project.
0002 //
0003 // Copyright (C) 2016 CERN for the benefit of the ACTS project
0004 //
0005 // This Source Code Form is subject to the terms of the Mozilla Public
0006 // License, v. 2.0. If a copy of the MPL was not distributed with this
0007 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
0008 
0009 #pragma once
0010 
0011 // Project include(s)
0012 #include "detray/core/detail/indexing.hpp"
0013 #include "detray/utils/invalid_values.hpp"
0014 
0015 namespace detray {
0016 
0017 /// Default index type
0018 using dindex = unsigned int;
0019 
0020 /// Global invalid index definition
0021 inline constexpr dindex dindex_invalid = detail::invalid_value<dindex>();
0022 
0023 /// Index ranges and sequences
0024 using dindex_range = detail::index_range<dindex>;
0025 using dsized_index_range =
0026     detail::index_range<dindex, detail::sized_index_range>;
0027 using dindex_sequence = dvector<dindex>;
0028 
0029 /// Index that consists of multiple subindices
0030 template <typename index_t = dindex, std::size_t DIM = 3u>
0031 using dmulti_index = detail::multi_index<index_t, DIM>;
0032 
0033 /// Link consisting of a type ID and an index
0034 template <typename id_t = dindex, typename index_t = dindex,
0035           typename value_t = std::uint_least32_t, value_t id_mask = 0xf0000000,
0036           value_t index_mask = ~id_mask>
0037 using dtyped_index =
0038     detail::typed_index<id_t, index_t, value_t, id_mask, index_mask>;
0039 
0040 namespace detail {
0041 
0042 /// Stub function to get a single index
0043 template <std::size_t ID>
0044 dindex get(dindex idx) noexcept {
0045   return idx;
0046 }
0047 
0048 }  // namespace detail
0049 
0050 }  // namespace detray