FixMath
Classes | Typedefs | Functions
FixMathPrivate Namespace Reference

Classes

struct  BitCounter
 
struct  BitCounter< value, 0 >
 

Typedefs

template<int8_t NF, uint64_t RANGE>
using UFixByRange_t = UFix< NIcount< RANGE >() -NF, NF, RANGE >
 
template<int8_t NF, uint64_t RANGE>
using SFixByRange_t = SFix< NIcount< RANGE-1 >() -NF, NF, RANGE >
 

Functions

template<typename T >
constexpr T shiftR (T x, int8_t bits)
 
constexpr int8_t sBitsToBytes (int8_t N)
 
constexpr int8_t uBitsToBytes (int8_t N)
 
template<typename T >
constexpr T FM_max (T N1, T N2)
 
template<typename T >
constexpr T FM_min (T N1, T N2)
 
constexpr uint64_t sFullRange (int8_t N)
 
constexpr uint64_t uFullRange (int8_t N)
 
constexpr uint64_t rangeAdd (byte NF, byte _NF, uint64_t RANGE, uint64_t _RANGE)
 
constexpr uint64_t rangeShift (int8_t N, int8_t SH, uint64_t RANGE)
 
template<uint64_t value>
constexpr int8_t NIcount ()
 
void static_autotests ()
 

Detailed Description

constexpr functions used internally.

This file implements a few compile-time checks to verify the implementation is correct.