Project
Loading...
Searching...
No Matches
Constants.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_CONSTANTS_H_
17#define TRACKINGITSU_INCLUDE_CONSTANTS_H_
18
19#include <array>
20#include <utility>
21
23#include "GPUCommonDefAPI.h"
24
26{
27
28constexpr float KB = 1024.f;
29constexpr float MB = KB * KB;
30constexpr float GB = MB * KB;
31constexpr bool DoTimeBenchmarks = true;
32constexpr bool SaveTimeBenchmarks = false;
33
34GPUconstexpr() float Tolerance{1e-12}; // numerical tolerance
35GPUconstexpr() int ClustersPerCell{3};
36GPUconstexpr() int UnusedIndex{-1};
37GPUconstexpr() float Resolution{0.0005f};
38GPUconstexpr() float Radl = 9.36f; // Radiation length of Si [cm]
39GPUconstexpr() float Rho = 2.33f; // Density of Si [g/cm^3]
40
41namespace helpers
42{
43
44// initialize a std::array at compile time fully with T
45template <typename T, std::size_t N, T Value>
46constexpr std::array<T, N> initArray()
47{
48 return []<std::size_t... Is>(std::index_sequence<Is...>) { return std::array<T, N>{(static_cast<void>(Is), Value)...}; }(std::make_index_sequence<N>{});
49}
50
51} // namespace helpers
52} // namespace o2::its::constants
53
54#endif /* TRACKINGITSU_INCLUDE_CONSTANTS_H_ */
o2::monitoring::tags::Value Value
GLdouble f
Definition glcorearb.h:310
constexpr std::array< T, N > initArray()
Definition Constants.h:46
GPUconstexpr() float Tolerance
Definition Constants.h:34
constexpr float GB
Definition Constants.h:30
constexpr float KB
Definition Constants.h:28
constexpr float MB
Definition Constants.h:29
constexpr bool DoTimeBenchmarks
Definition Constants.h:31
constexpr bool SaveTimeBenchmarks
Definition Constants.h:32