Project
Loading...
Searching...
No Matches
ArrayUtils.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 TRACKINGITSU_INCLUDE_ARRAYUTILS_H_
17
#define TRACKINGITSU_INCLUDE_ARRAYUTILS_H_
18
19
#include <array>
20
#include <cstddef>
21
#include <utility>
22
23
namespace
o2
24
{
25
namespace
its
26
{
27
namespace
CA
28
{
29
30
namespace
ArrayUtils
31
{
32
template
<
typename
T, std::size_t... Is,
typename
Initializer
>
33
constexpr
std::array<T,
sizeof
...(Is)>
fillArray
(
Initializer
, std::index_sequence<Is...>);
34
template
<
typename
T, std::
size_t
N,
typename
Initializer>
35
constexpr
std::array<T, N>
fillArray
(
Initializer
);
36
}
// namespace ArrayUtils
37
38
template
<
typename
T, std::size_t... Is,
typename
Initializer
>
39
constexpr
std::array<T,
sizeof
...(Is)>
ArrayUtils::fillArray
(
Initializer
initializer, std::index_sequence<Is...>)
40
{
41
return
std::array<T,
sizeof
...(Is)>{{initializer(Is)...}};
42
}
43
44
template
<
typename
T, std::
size_t
N,
typename
Initializer>
45
constexpr
std::array<T, N>
ArrayUtils::fillArray
(
Initializer
initializer)
46
{
47
return
ArrayUtils::fillArray<T>(initializer, std::make_index_sequence<N>{});
48
}
49
}
// namespace CA
50
}
// namespace its
51
}
// namespace o2
52
53
#endif
/* TRACKINGITSU_INCLUDE_ARRAYUTILS_H_ */
o2::its::CA::ArrayUtils::fillArray
constexpr std::array< T, sizeof...(Is)> fillArray(Initializer, std::index_sequence< Is... >)
Definition
ArrayUtils.h:39
o2
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
Definition
BitstreamReader.h:24
Initializer
Definition
test_mpl_tools.cxx:71
Detectors
ITSMFT
ITS
tracking
include
ITStracking
ArrayUtils.h
Generated on Tue Feb 25 2025 23:16:20 for Project by
1.9.8