10 #if defined(__GNUC__) || defined(__INTEL_COMPILER) || defined(__clang__) 11 #define tdc_likely(x) __builtin_expect((x) != 0, 1) 14 #define tdc_unlikely(x) __builtin_expect((x) != 0, 0) 18 #define tdc_likely(x) x 21 #define tdc_unlikely(x) x 34 #if defined(GOOGLE_STRIP_LOG) 35 #undef GOOGLE_STRIP_LOG 38 #define GOOGLE_STRIP_LOG 1 // no google logging 42 #if defined(DEBUG) && defined(PARANOID) 43 #define IF_PARANOID(x) x 47 #define IF_PARANOID(x) 64 template<
typename T,
class X =
void>
69 struct FastIntType<uint_impl_t<N>, std::enable_if_t<(N <= 32)>> {
70 using Type = uint32_t;
73 struct FastIntType<uint_impl_t<N>, std::enable_if_t<(N > 32)>> {
74 using Type = uint64_t;
77 struct FastIntType<uint32_t> {
78 using Type = uint32_t;
81 struct FastIntType<uint64_t> {
82 using Type = uint64_t;
88 template<
typename actual_type>
89 using fast_t =
typename FastIntType<actual_type>::Type;
117 constexpr
size_t INDEX_MAX = std::numeric_limits<len_compact_t>::max();
134 constexpr
size_t ULITERAL_MAX = std::numeric_limits<uliteral_t>::max();
141 template<
typename T =
size_t>
143 return std::make_unsigned_t<T>(c);
151 template<
typename T =
size_t>
153 return std::make_unsigned_t<T>(c);
Contains the text compression and encoding framework.
uint8_t uliteral_t
Type to represent signed single literals.
constexpr T literal2int(uliteral_t c)
Converts a literal to an integer value as if unsigned.
constexpr size_t INDEX_FAST_MAX
The maximum value of len_t.
typename uint_dispatch_t< N >::type uint_t
constexpr size_t ULITERAL_MAX
The maximum value of uliteral_t.
uint32_t len_compact_t
Type to represent an bit-compact length value.
constexpr size_t INDEX_BITS
The amount of bits required to store the binary representation of a value of type len_compact_t...
fast_t< len_compact_t > len_t
Type to represent an length value.
constexpr size_t INDEX_MAX
The maximum value of len_compact_t.
typename FastIntType< actual_type >::Type fast_t
Type to represent integer values in the size range of actual_type that may require more Bits than it...
constexpr size_t INDEX_FAST_BITS
The amount of bits required to store the binary representation of a value of type len_t...
constexpr uliteral_t int2literal(const T &c)
Converts an integer value to a literal as if unsigned.