Project
Loading...
Searching...
No Matches
defaults.h
Go to the documentation of this file.
1
// Copyright 2019-2023 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
15
16
#ifndef RANS_INTERNAL_COMMON_DEFAULTS_H_
17
#define RANS_INTERNAL_COMMON_DEFAULTS_H_
18
19
#include <cstddef>
20
#include <cstdint>
21
#include <cstring>
22
23
#include "
rANS/internal/common/defines.h
"
24
25
#include <cstdint>
26
27
namespace
o2::rans
28
{
29
enum class
CoderTag
: uint8_t {
Compat
,
30
SingleStream
,
31
SSE
,
32
AVX2
};
33
34
using
count_t
= uint32_t;
35
36
namespace
defaults
37
{
38
39
#if defined(RANS_AVX2)
40
inline
constexpr
o2::rans::CoderTag
DefaultTag =
o2::rans::CoderTag::AVX2
;
41
#elif defined(RANS_SSE_ONLY)
42
inline
constexpr
o2::rans::CoderTag
DefaultTag =
o2::rans::CoderTag::SSE
;
43
#elif (defined(RANS_SINGLE_STREAM) && !defined(RANS_SIMD))
44
inline
constexpr
o2::rans::CoderTag
DefaultTag =
o2::rans::CoderTag::SingleStream
;
45
#elif (defined(RANS_COMPAT) && !defined(RANS_SINGLE_STREAM) && !defined(RANS_SIMD))
46
inline
constexpr
o2::rans::CoderTag
DefaultTag =
o2::rans::CoderTag::Compat
;
47
#else
48
#error your hardware or compiler settings do not support librans
49
#endif
50
51
namespace
internal
52
{
53
inline
constexpr
size_t
RenormingLowerBound
= 20;
54
}
// namespace internal
55
56
inline
constexpr
size_t
MinRenormPrecisionBits
= 10;
57
inline
constexpr
size_t
MaxRenormPrecisionBits
= 20;
58
59
}
// namespace defaults
60
}
// namespace o2::rans
61
62
#endif
/* RANS_INTERNAL_COMMON_DEFAULTS_H_ */
defines.h
preprocessor defines to enable features based on CPU architecture
o2::rans::defaults::internal::RenormingLowerBound
constexpr size_t RenormingLowerBound
Definition
defaults.h:53
o2::rans::defaults::MinRenormPrecisionBits
constexpr size_t MinRenormPrecisionBits
Definition
defaults.h:56
o2::rans::defaults::MaxRenormPrecisionBits
constexpr size_t MaxRenormPrecisionBits
Definition
defaults.h:57
o2::rans
Definition
compat.h:42
o2::rans::CoderTag
CoderTag
Definition
defaults.h:29
o2::rans::CoderTag::Compat
@ Compat
o2::rans::CoderTag::SSE
@ SSE
o2::rans::CoderTag::SingleStream
@ SingleStream
o2::rans::CoderTag::AVX2
@ AVX2
o2::rans::count_t
uint32_t count_t
Definition
defaults.h:34
Utilities
rANS
include
rANS
internal
common
defaults.h
Generated on Tue Feb 25 2025 17:03:28 for Project by
1.9.8