|
void | ABORT_impl (const char *func, const char *file, const int line, const char *format,...) noexcept |
| Use for unconditional ::abort() call with given messages, prefix '[elapsed_time] ABORT @ file:line func: '. More...
|
|
template<typename int_type > |
constexpr fraction< int_type > | abs (const fraction< int_type > &rhs) noexcept |
| Returns the absolute fraction. More...
|
|
constexpr fraction_timespec | abs (const fraction_timespec &rhs) noexcept |
| Returns the absolute fraction_timespec. More...
|
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T > &&!std::is_unsigned_v< T >, bool > = true> |
constexpr T | abs (const T x) noexcept |
| Returns the absolute value of an arithmetic number (w/ branching) in O(1) More...
|
|
mp::BigInt | abs (mp::BigInt x) noexcept |
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr bool | add_overflow (const T a, const T b, T &res) noexcept |
| Integer overflow aware addition returning true if overflow occurred, otherwise false having the result stored in res. More...
|
|
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
constexpr T | adeg_to_rad (const T arc_degree) noexcept |
| Converts arc-degree to radians. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type | almost_equal (const T &a, const T &b, int ulp=1, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * |a+b| * ulp , where |a+b| scales epsilon to the magnitude of used values. More...
|
|
constexpr EUI48 | be_to_cpu (EUI48 const &n) noexcept |
|
constexpr uint128dp_t | be_to_cpu (uint128dp_t const &n) noexcept |
|
constexpr uint16_t | be_to_cpu (uint16_t const n) noexcept |
|
constexpr uint192dp_t | be_to_cpu (uint192dp_t const &n) noexcept |
|
constexpr uint256dp_t | be_to_cpu (uint256dp_t const &n) noexcept |
|
constexpr uint32_t | be_to_cpu (uint32_t const n) noexcept |
|
constexpr uint64_t | be_to_cpu (uint64_t const &n) noexcept |
|
template<typename R , typename I , typename... A> |
jau::function< R(A...)> | bind_capref (I *data_ptr, R(*func)(I *, A...)) noexcept |
| Bind given data by passing the captured reference (pointer) to the value and non-void function to an anonymous function using func::capref_target_t. More...
|
|
template<typename I , typename... A> |
jau::function< void(A...)> | bind_capref (I *data_ptr, void(*func)(I *, A...)) noexcept |
| Bind given data by passing the captured reference (pointer) to the value and void function to an anonymous function using func::capref_target_t. More...
|
|
template<typename R , typename I , typename... A> |
jau::function< R(A...)> | bind_capval (const I &data, R(*func)(I &, A...)) noexcept |
| Bind given data by copying the captured value and the given non-void function to an anonymous function using func::capval_target_t. More...
|
|
template<typename I , typename... A> |
jau::function< void(A...)> | bind_capval (const I &data, void(*func)(I &, A...)) noexcept |
| Bind given data by copying the captured value and the given void function to an anonymous function using func::capval_target_t. More...
|
|
template<typename R , typename I , typename... A> |
jau::function< R(A...)> | bind_capval (I &&data, R(*func)(I &, A...)) noexcept |
| Bind given data by moving the captured value and copying the given non-void function to an anonymous function using func::capval_target_t. More...
|
|
template<typename I , typename... A> |
jau::function< void(A...)> | bind_capval (I &&data, void(*func)(I &, A...)) noexcept |
| Bind given data by moving the captured value and copying the given void function to an anonymous function using func::capval_target_t. More...
|
|
template<typename R , typename... A> |
jau::function< R(A...)> | bind_free (R(*func)(A...)) noexcept |
| Bind given non-void free-function to an anonymous function using func::free_target_t. More...
|
|
template<typename... A> |
jau::function< void(A...)> | bind_free (void(*func)(A...)) noexcept |
| Bind given void free-function to an anonymous function using func::free_target_t. More...
|
|
template<typename R , typename C , typename... A> |
jau::function< R(A...)> | bind_member (C *base, R(C::*mfunc)(A...)) noexcept |
| Bind given class instance and non-void member function to an anonymous function using func_member_targer_t. More...
|
|
template<typename C , typename... A> |
jau::function< void(A...)> | bind_member (C *base, void(C::*mfunc)(A...)) noexcept |
| Bind given class instance and void member function to an anonymous function using func_member_targer_t. More...
|
|
template<typename R , typename C0 , typename C1 , typename... A> |
jau::function< R(A...)> | bind_member (C1 *base, R(C0::*mfunc)(A...)) noexcept |
| Bind given class instance and non-void member function to an anonymous function using func_member_targer_t. More...
|
|
template<typename C0 , typename C1 , typename... A> |
jau::function< void(A...)> | bind_member (C1 *base, void(C0::*mfunc)(A...)) noexcept |
| Bind given class instance and void member function to an anonymous function using func_member_targer_t. More...
|
|
template<typename R , typename... A> |
jau::function< R(A...)> | bind_std (uint64_t id, std::function< R(A...)> func) noexcept |
| Bind given non-void std::function to an anonymous function using func::std_target_t. More...
|
|
template<typename... A> |
jau::function< void(A...)> | bind_std (uint64_t id, std::function< void(A...)> func) noexcept |
| Bind given void std::function to an anonymous function using func::std_target_t. More...
|
|
template<class Dest , class Source > |
constexpr std::enable_if_t< sizeof(Dest)==sizeof(Source) &&std::is_trivially_copyable_v< Dest > &&std::is_trivially_copyable_v< Source >, Dest > | bit_cast (const Source &src) noexcept |
| C++20 bit_cast<>(arg) implementation for C++17. More...
|
|
constexpr uint64_t | bit_value (const double a) noexcept |
| Returns the unsigned integer representation according to IEEE 754 (IEC 559) double floating-point bit layout. More...
|
|
constexpr uint32_t | bit_value (const float a) noexcept |
| Returns the unsigned integer representation according to IEEE 754 (IEC 559) single floating-point bit layout. More...
|
|
constexpr uint64_t | bit_value_raw (const double a) noexcept |
| Returns the unsigned integer representation according to IEEE 754 (IEC 559) double floating-point bit layout. More...
|
|
constexpr uint32_t | bit_value_raw (const float a) noexcept |
| Returns the unsigned integer representation according to IEEE 754 (IEC 559) single floating-point bit layout. More...
|
|
template<class T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
jau::uint_bytes< sizeof(T)>::type | bit_value_raw (const T a) noexcept |
| Returns the unsigned integer representation according to IEEE 754 (IEC 559) floating-point bit layout. More...
|
|
constexpr EUI48 | bswap (EUI48 const &source) noexcept |
|
constexpr uint128dp_t | bswap (uint128dp_t const &source) noexcept |
|
constexpr uint16_t | bswap (uint16_t const source) noexcept |
|
constexpr uint192dp_t | bswap (uint192dp_t const &source) noexcept |
|
constexpr uint256dp_t | bswap (uint256dp_t const &source) noexcept |
|
constexpr uint32_t | bswap (uint32_t const source) noexcept |
|
constexpr uint64_t | bswap (uint64_t const &source) noexcept |
|
constexpr void | bswap (uint8_t *sink, uint8_t const *source, nsize_t len) |
|
static constexpr void | bswap_6bytes (uint8_t *sink, const uint8_t *source) noexcept |
|
std::string & | byteHexString (std::string &dest, const uint8_t value, const bool lowerCase) noexcept |
| Produce a hexadecimal string representation of the given byte value. More...
|
|
template<class uint8_container_type , std::enable_if_t< std::is_integral_v< typename uint8_container_type::value_type > &&std::is_convertible_v< typename uint8_container_type::value_type, uint8_t >, bool > = true> |
std::string | bytesHexString (const uint8_container_type &bytes, const bool lsbFirst, const bool lowerCase=true) noexcept |
|
std::string | bytesHexString (const void *data, const nsize_t offset, const nsize_t length, const bool lsbFirst, const bool lowerCase=true) noexcept |
| Produce a hexadecimal string representation of the given byte values. More...
|
|
const uint8_t * | cast_char_ptr_to_uint8 (const char *s) noexcept |
|
const char * | cast_uint8_ptr_to_char (const uint8_t *b) noexcept |
|
char * | cast_uint8_ptr_to_char (uint8_t *b) noexcept |
|
const mp::BigInt & | clamp (const mp::BigInt &x, const mp::BigInt &min_val, const mp::BigInt &max_val) noexcept |
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, bool > = true> |
constexpr T | clamp (const T x, const T min_val, const T max_val) noexcept |
| Returns constrained integral value to lie between given min- and maximum value (w/ branching) in O(1). More...
|
|
mp::BigInt & | clamp (mp::BigInt &x, mp::BigInt &min_val, mp::BigInt &max_val) noexcept |
|
void | clear_bit_uint32 (const uint8_t nr, uint32_t &mask) |
|
void | clear_bit_uint64 (const uint8_t nr, uint64_t &mask) |
|
template<class T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
constexpr int | compare (const T a, const T b) noexcept |
| Returns -1 , 0 or 1 if a is less, equal or greater than b , disregarding epsilon but considering NaN , -Inf and +Inf . More...
|
|
template<class T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
constexpr int | compare (const T a, const T b, const T epsilon) noexcept |
| Returns -1 , 0 or 1 if a is less, equal or greater than b , considering epsilon and NaN , -Inf and +Inf . More...
|
|
void | COND_PRINT_impl (const char *format,...) noexcept |
|
template<class InputArray , class T > |
constexpr bool | contains (InputArray &array, const T &value) |
| Return true if value is contained in array . More...
|
|
constexpr EUI48 | cpu_to_be (EUI48 const &h) noexcept |
|
constexpr uint128dp_t | cpu_to_be (uint128dp_t const &h) noexcept |
|
constexpr uint16_t | cpu_to_be (uint16_t const h) noexcept |
|
constexpr uint192dp_t | cpu_to_be (uint192dp_t const &h) noexcept |
|
constexpr uint256dp_t | cpu_to_be (uint256dp_t const &h) noexcept |
|
constexpr uint32_t | cpu_to_be (uint32_t const h) noexcept |
|
constexpr uint64_t | cpu_to_be (uint64_t const &h) noexcept |
|
constexpr EUI48 | cpu_to_le (EUI48 const &h) noexcept |
|
constexpr uint128dp_t | cpu_to_le (uint128dp_t const &h) noexcept |
|
constexpr uint16_t | cpu_to_le (uint16_t const h) noexcept |
|
constexpr uint192dp_t | cpu_to_le (uint192dp_t const &h) noexcept |
|
constexpr uint256dp_t | cpu_to_le (uint256dp_t const &h) noexcept |
|
constexpr uint32_t | cpu_to_le (uint32_t const h) noexcept |
|
constexpr uint64_t | cpu_to_le (uint64_t const &h) noexcept |
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T > &&std::is_integral_v< T > &&!std::is_unsigned_v< T >, bool > = true> |
constexpr T | ct_abs (const T x) noexcept |
| Returns the absolute value of an arithmetic number (w/o branching) in O(1) and constant time (CT), while ct_abs(INT_MIN) is undefined behavior (UB) instead of being mapped correctly to INT_MAX like jau::abs() does, see above. More...
|
|
constexpr uint32_t | ct_bit_count (uint32_t n) noexcept |
| Returns the number of set bits within given 32bit integer (w/o branching) in O(1) and constant time (CT). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr T | ct_clamp (const T x, const T min_val, const T max_val) noexcept |
| Returns constrained integral value to lie between given min- and maximum value for MIN <= x - y <= MAX (w/o branching) in O(1) and constant time (CT). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T >, bool > = true> |
constexpr T | ct_expand_top_bit (T x) |
| Returns ~0 (2-complement) if top bit of arg is set, otherwise 0 (w/o branching) in O(1) and constant time (CT). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T >, bool > = true> |
constexpr T | ct_is_zero (T x) |
| Returns ~0 (2-complement) if arg is zero, otherwise 0 (w/o branching) in O(1) and constant time (CT). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T >, bool > = true> |
constexpr T | ct_masked_merge (T mask, T a_if_masked, T b_if_unmasked) |
| Returns merged a_if_masked bits selected by mask 1 bits and b_if_unmasked bits selected by mask 0 bits (w/o branching) in O(1) and constant time (CT). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr T | ct_max (const T x, const T y) noexcept |
| Returns the maximum of two integrals for MIN <= x - y <= MAX (w/o branching) in O(1) and constant time (CT). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr T | ct_min (const T x, const T y) noexcept |
| Returns the minimum of two integrals for MIN <= x - y <= MAX (w/o branching) in O(1) and constant time (CT). More...
|
|
constexpr uint32_t | ct_next_power_of_2 (uint32_t n) |
| Returns the next higher power of 2 of given unsigned 32-bit n (w/o branching) in O(1) and constant time (CT). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr int | ct_sign (const T x) noexcept |
| Returns the value of the sign function (w/o branching) in O(1) and constant time (CT) More...
|
|
template<typename T > |
constexpr const char * | ctti_name () noexcept |
| Returns the type name of given type T using template Compile Time Type Information (CTTI) only with static constant storage duration. More...
|
|
template<typename R , typename L , typename... A> |
constexpr const char * | ctti_name () noexcept |
| Returns the type name of given function types R(*L)(A...) using template Compile Time Type Information (CTTI) only with static constant storage duration. More...
|
|
void | DBG_PRINT_impl (const char *format,...) noexcept |
|
std::string | demangle_name (const char *mangled_name) noexcept |
| Returns the demangled given mangled_name if successful, otherwise the mangled_name. More...
|
|
std::string | dfa_utf8_decode (const uint8_t *buffer, const size_t buffer_size) |
| Returns all valid consecutive UTF-8 characters within buffer in the range up to buffer_size or until EOS. More...
|
|
uint32_t | dfa_utf8_decode (uint32_t &state, uint32_t &codep, const uint32_t byte_value) |
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr nsize_t | digits10 (const T x, const bool sign_is_digit=true) noexcept |
| Returns the number of decimal digits of the given integral value number using std::log10<T>(). More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr nsize_t | digits10 (const T x, const snsize_t x_sign, const bool sign_is_digit=true) noexcept |
| Returns the number of decimal digits of the given integral value number using std::log10<T>(). More...
|
|
constexpr double | double_value (const uint64_t a) noexcept |
| Converting IEEE 754 (IEC 559) double floating-point bit layout to double, see bit_value() More...
|
|
template<class T > |
std::enable_if< std::is_integral_v< T >, bool >::type constexpr | equals (const T &a, const T &b) noexcept |
| Returns true if both values are equal. More...
|
|
template<class T > |
std::enable_if< std::is_integral_v< T >, bool >::type constexpr | equals (const T &a, const T &b, const T &allowed_deviation) noexcept |
| Returns true if both values are equal, i.e. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | equals (const T &a, const T &b, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true if both values are equal, i.e. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | equals (const T &a, const T &b, int ulp, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * ulp . More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | equals2 (const T &a, const T &b, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true if both values are equal, i.e. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | equals_raw (const T &a, const T &b) noexcept |
| Returns true if both values are equal disregarding epsilon but considering NaN , -Inf and +Inf . More...
|
|
void | ERR_PRINT_impl (const char *prefix, const bool backtrace, const char *func, const char *file, const int line, const char *format,...) noexcept |
|
void | ERR_PRINTv (const char *func, const char *file, const int line, const char *format, va_list args) noexcept |
| Use for unconditional error messages, prefix '[elapsed_time] Error @ file:line func: '. More...
|
|
template<class InputIt , class T > |
constexpr InputIt | find (InputIt first, InputIt last, const T &value) |
| Like std::find() of 'algorithm'. More...
|
|
template<class T > |
const T::value_type * | find_const (T &data, typename T::value_type const &elem, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept |
|
template<class T > |
const T::value_type * | find_const (T &data, typename T::value_type const &elem, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept |
|
template<class InputIt , class UnaryPredicate > |
constexpr InputIt | find_if (InputIt first, InputIt last, UnaryPredicate p) |
| Like std::find_if() of 'algorithm'. More...
|
|
template<class InputIt , class UnaryPredicate > |
constexpr InputIt | find_if_not (InputIt first, InputIt last, UnaryPredicate q) |
| Like std::find_if_not() of 'algorithm'. More...
|
|
constexpr float | float_value (const uint32_t a) noexcept |
| Converting IEEE 754 (IEC 559) single floating-point bit layout to float, see bit_value() More...
|
|
template<class InputIt , class UnaryFunction > |
constexpr UnaryFunction | for_each (InputIt first, InputIt last, UnaryFunction f) |
| Like std::for_each() of 'algorithm'. More...
|
|
template<class T , class UnaryFunction > |
constexpr UnaryFunction | for_each_const (T &data, UnaryFunction f, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept |
|
template<class T , class UnaryFunction > |
constexpr UnaryFunction | for_each_const (T &data, UnaryFunction f, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept |
|
template<class InputIt , class UnaryFunction > |
constexpr UnaryFunction | for_each_fidelity (InputIt first, InputIt last, UnaryFunction f) |
| Like jau::for_each(), see above. More...
|
|
template<class T , class UnaryFunction > |
constexpr UnaryFunction | for_each_fidelity (T &data, UnaryFunction f, std::enable_if_t< !is_cow_type< T >::value, bool >=true) noexcept |
| See jau::for_each_fidelity() More...
|
|
template<class T , class UnaryFunction > |
constexpr UnaryFunction | for_each_fidelity (T &data, UnaryFunction f, std::enable_if_t< is_cow_type< T >::value, bool >=true) noexcept |
| See jau::for_each_fidelity() More...
|
|
template<class InputArray , class UnaryFunction > |
constexpr UnaryFunction | for_each_idx (InputArray &array, UnaryFunction f) |
| Custom for_each template, using indices instead of iterators, allowing container to be modified within lambda 'callback'. More...
|
|
template<class Mutex , class InputArray , class UnaryFunction > |
constexpr UnaryFunction | for_each_idx_mtx (Mutex &mtx, InputArray &array, UnaryFunction f) |
| Custom for_each template, same as jau::for_each but using indices instead of iterators and a mutex. More...
|
|
template<class Mutex , class InputIt , class UnaryFunction > |
constexpr UnaryFunction | for_each_mtx (Mutex &mtx, InputIt first, InputIt last, UnaryFunction f) |
| Custom for_each template, same as jau::for_each but using a mutex. More...
|
|
std::string | format_string (const char *format,...) noexcept |
| Returns a string according to printf() formatting rules and variable number of arguments following the format argument. More...
|
|
int | fprintf_td (const uint64_t elapsed_ms, FILE *stream, const char *format,...) noexcept |
| Convenient fprintf() invocation, prepending the given elapsed_ms timestamp. More...
|
|
int | fprintf_td (FILE *stream, const char *format,...) noexcept |
| Convenient fprintf() invocation, prepending the environment::getElapsedMillisecond() timestamp. More...
|
|
mp::BigInt | gcd (const mp::BigInt &a, const mp::BigInt &b) noexcept |
|
template<typename T , std::enable_if_t< std::is_integral_v< T > &&!std::is_unsigned_v< T >, bool > = true> |
constexpr T | gcd (T a, T b) noexcept |
| Returns the greatest common divisor (GCD) of the two given integer values following Euclid's algorithm from Euclid's Elements ~300 BC, using the absolute positive value of given integers. More...
|
|
std::string | get_backtrace (const bool skip_anon_frames, const jau::snsize_t max_frames=-1, const jau::snsize_t skip_frames=1) noexcept |
| Returns a de-mangled backtrace string separated by newline excluding this function. More...
|
|
constexpr int8_t | get_int8 (uint8_t const *buffer) noexcept |
|
template<typename T > |
constexpr T | get_packed_value (const packed_t< T > *source, const lb_endian_t byte_order) noexcept |
| Return packed_t::store after converting it to from either lb_endian::little or lb_endian::big depending on given byte_order to lb_endian::native. More...
|
|
std::string | get_string (const uint8_t *buffer, nsize_t const buffer_len, nsize_t const max_len) noexcept |
| Returns a C++ String taken from buffer with maximum length of min(max_len, max_len). More...
|
|
constexpr uint128dp_t | get_uint128 (uint8_t const *buffer) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint128dp_t | get_uint128 (uint8_t const *buffer, const lb_endian_t byte_order) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint16_t | get_uint16 (uint8_t const *buffer) noexcept |
| Returns a uint16_t value from the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
constexpr uint16_t | get_uint16 (uint8_t const *buffer, const lb_endian_t byte_order) noexcept |
| Returns a uint16_t value from the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
constexpr uint192dp_t | get_uint192 (uint8_t const *buffer) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint192dp_t | get_uint192 (uint8_t const *buffer, const lb_endian_t byte_order) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint256dp_t | get_uint256 (uint8_t const *buffer) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint256dp_t | get_uint256 (uint8_t const *buffer, const lb_endian_t byte_order) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint32_t | get_uint32 (uint8_t const *buffer) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint32_t | get_uint32 (uint8_t const *buffer, const lb_endian_t byte_order) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint64_t | get_uint64 (uint8_t const *buffer) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint64_t | get_uint64 (uint8_t const *buffer, const lb_endian_t byte_order) noexcept |
| See get_uint16() for reference. More...
|
|
constexpr uint8_t | get_uint8 (uint8_t const *buffer) noexcept |
|
uuid128_t | get_uuid128 (uint8_t const *buffer) noexcept |
|
uuid128_t | get_uuid128 (uint8_t const *buffer, lb_endian_t const le_or_be) noexcept |
|
uuid16_t | get_uuid16 (uint8_t const *buffer) noexcept |
|
uuid16_t | get_uuid16 (uint8_t const *buffer, lb_endian_t const le_or_be) noexcept |
|
uuid32_t | get_uuid32 (uint8_t const *buffer) noexcept |
|
uuid32_t | get_uuid32 (uint8_t const *buffer, lb_endian_t const le_or_be) noexcept |
|
template<typename T > |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, T > | get_value (uint8_t const *buffer) noexcept |
| Returns a T value from the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
template<typename T > |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, T > | get_value (uint8_t const *buffer, const lb_endian_t byte_order) noexcept |
| Returns a T value from the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
uint64_t | getCurrentMilliseconds () noexcept |
| Returns current monotonic time in milliseconds. More...
|
|
fraction_timespec | getMonotonicTime () noexcept |
| Returns current monotonic time since Unix Epoch 00:00:00 UTC on 1970-01-01 . More...
|
|
uint64_t | getWallClockSeconds () noexcept |
| Returns current wall-clock system time of day in seconds since Unix Epoch 00:00:00 UTC on 1 January 1970 . More...
|
|
fraction_timespec | getWallClockTime () noexcept |
| Returns current wall-clock real-time since Unix Epoch 00:00:00 UTC on 1970-01-01 . More...
|
|
size_t | hexStringBytes (std::vector< uint8_t > &out, const std::string &hexstr, const bool lsbFirst, const bool checkLeading0x) noexcept |
| Converts a given hexadecimal string representation into a byte vector. More...
|
|
size_t | hexStringBytes (std::vector< uint8_t > &out, const uint8_t hexstr[], const size_t hexstr_len, const bool lsbFirst, const bool checkLeading0x) noexcept |
| See hexStringBytes() More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T >, bool > = true> |
constexpr nsize_t | high_bit (T x) |
| Return the index of the highest set bit w/ branching (loop) in O(n), actually O(n/2). More...
|
|
template<class T , std::enable_if_t< std::is_arithmetic_v< T >, bool > = true> |
bool | in_range (const T &a, const T &b, const T &range) |
| base_math: arithmetic types, i.e. More...
|
|
void | INFO_PRINT (const char *format,...) noexcept |
| Use for unconditional informal messages, prefix '[elapsed_time] Info: '. More...
|
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T > &&!std::is_unsigned_v< T >, bool > = true> |
constexpr T | invert_sign (const T x) noexcept |
| Safely inverts the sign of an arithmetic number w/ branching in O(1) More...
|
|
constexpr bool | is_big_endian () noexcept |
| Evaluates true if platform is running in big endian mode, i.e. More...
|
|
consteval_cxx20 bool | is_builtin_bit_cast_available () noexcept |
| Query whether __builtin_bit_cast(Dest_type, arg) is available, using jau::has_builtin_bit_cast. More...
|
|
consteval_cxx20 bool | is_builtin_int128_available () noexcept |
|
consteval_cxx20 bool | is_cxx17 () noexcept |
| Returns true if compiled with >= C++17. More...
|
|
consteval_cxx20 bool | is_cxx20 () noexcept |
| Returns true if compiled with >= C++20. More...
|
|
consteval_cxx20 bool | is_cxx23 () noexcept |
| Returns true if compiled with >= C++23. More...
|
|
consteval_cxx20 bool | is_cxx26 () noexcept |
| Returns true if compiled with >= C++26. More...
|
|
consteval_cxx20 bool | is_debug_enabled () noexcept |
| Returns true if compiled with debug information and w/o optimization, i.e. More...
|
|
constexpr bool | is_defined_endian (const endian_t &v) noexcept |
| Evaluates true if the given endian is defined, i.e. More...
|
|
constexpr bool | is_little_endian () noexcept |
| Evaluates true if platform is running in little endian mode, i.e. More...
|
|
constexpr bool | is_little_endian (const endian_t byte_order) noexcept |
| Returns true if given byte_order equals endian::little, otherwise false. More...
|
|
constexpr bool | is_little_endian (const lb_endian_t byte_order) noexcept |
| Returns true if given byte_order equals lb_endian::little, otherwise false. More...
|
|
constexpr bool | is_little_or_big_endian () noexcept |
| Evaluates true if platform is running in little or big endian mode, i.e. More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T >, bool > = true> |
constexpr bool | is_power_of_2 (const T x) noexcept |
| Power of 2 test (w/o branching ?) in O(1) More...
|
|
consteval_cxx20 bool | is_rtti_available () noexcept |
| Returns true if compiled with RTTI available. More...
|
|
template<class T > |
std::enable_if< std::is_integral_v< T >, bool >::type constexpr | is_zero (const T &a) noexcept |
| base_math: arithmetic types, i.e. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | is_zero (const T &a, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true if the given value is less than epsilon, w/ epsilon > 0. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | is_zero2f (const T &a, const T &b, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true if all given values a and b are less than epsilon, w/ epsilon > 0. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | is_zero3f (const T &a, const T &b, const T &c, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true if all given values a, b and c are less than epsilon, w/ epsilon > 0. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | is_zero4f (const T &a, const T &b, const T &c, const T &d, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| Returns true if all given values a, b, c and d are less than epsilon, w/ epsilon > 0. More...
|
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, bool >::type constexpr | is_zero_raw (const T &a) noexcept |
| Returns true if the given value is zero, disregarding epsilon but considering NaN , -Inf and +Inf . More...
|
|
constexpr bool | isTypeTraitBitSet (const TypeTraitGroup mask, const TypeTraitGroup bit) noexcept |
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr bool | lcm_overflow (const T a, const T b, T &result) noexcept |
| Integer overflow aware calculation of least common multiple (LCM) following Euclid's algorithm from Euclid's Elements ~300 BC. More...
|
|
constexpr EUI48 | le_to_cpu (EUI48 const &l) noexcept |
|
constexpr uint128dp_t | le_to_cpu (uint128dp_t const &l) noexcept |
|
constexpr uint16_t | le_to_cpu (uint16_t const l) noexcept |
|
constexpr uint192dp_t | le_to_cpu (uint192dp_t const &l) noexcept |
|
constexpr uint256dp_t | le_to_cpu (uint256dp_t const &l) noexcept |
|
constexpr uint32_t | le_to_cpu (uint32_t const l) noexcept |
|
constexpr uint64_t | le_to_cpu (uint64_t const &l) noexcept |
|
template<class T > |
std::enable_if< std::is_floating_point_v< T >, T >::type | machineEpsilon () noexcept |
| Calculates the smallest floating point value approximation the given type T can represent, the machine epsilon of T. More...
|
|
template<typename First , typename... Next> |
constexpr cow_darray< First > | make_cow_darray (First &&arg1) |
| Complement constructor for cow_darray<T> instance, move semantics initializer for one argument. More...
|
|
template<typename First , typename... Next, std::enable_if_t< std::conjunction_v< std::is_same< First, Next >... >, bool > = true> |
constexpr cow_darray< First > | make_cow_darray (First &&arg1, Next &&... argsN) |
| Construct a cow_darray<T> instance, initialized by move semantics from the variadic (template pack) argument list. More...
|
|
template<typename T > |
jau::type_info | make_ctti () noexcept |
| Constructs a jau::type_info instance based on given type T using template Compile Time Type Information (CTTI) only. More...
|
|
template<typename R , typename L , typename... A> |
jau::type_info | make_ctti () noexcept |
| Constructs a jau::type_info instance based on given function types R(*L)(A...) using template Compile Time Type Information (CTTI) only via RTTI's `typeid(L) if available or jau::ctti_name<R, L, A...>() otherwise. More...
|
|
template<typename First , typename... Next> |
constexpr darray< First > | make_darray (First &&arg1) |
| Complement constructor for darray<T> instance, move semantics initializer for one argument. More...
|
|
template<typename First , typename... Next, std::enable_if_t< std::conjunction_v< std::is_same< First, Next >... >, bool > = true> |
constexpr darray< First > | make_darray (First &&arg1, Next &&... argsN) |
| Construct a darray<T> instance, initialized by move semantics from the variadic (template pack) argument list. More...
|
|
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
std::string & | mat_to_string (std::string &sb, const std::string &rowPrefix, const std::string &f, const T a[], const jau::nsize_t rows, const jau::nsize_t columns, const bool rowMajorOrder) noexcept |
| Appends a matrix of floating points to the given string sb More...
|
|
template<typename int_type > |
constexpr const fraction< int_type > & | max (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
| Return the maximum of the two given fractions. More...
|
|
constexpr const fraction_timespec & | max (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
| Return the maximum of the two given fraction_timespec. More...
|
|
const mp::BigInt & | max (const mp::BigInt &x, const mp::BigInt &y) noexcept |
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, bool > = true> |
constexpr T | max (const T x, const T y) noexcept |
| Returns the maximum of two integrals (w/ branching) in O(1) More...
|
|
mp::BigInt & | max (mp::BigInt &x, mp::BigInt &y) noexcept |
|
uint128dp_t | merge_uint128 (uint16_t const uuid16, uint128dp_t const &base_uuid, nsize_t const uuid16_le_octet_index) |
| Merge the given 'uuid16' into a 'base_uuid' copy at the given little endian 'uuid16_le_octet_index' position. More...
|
|
uint128dp_t | merge_uint128 (uint32_t const uuid32, uint128dp_t const &base_uuid, nsize_t const uuid32_le_octet_index) |
| Merge the given 'uuid32' into a 'base_uuid' copy at the given little endian 'uuid32_le_octet_index' position. More...
|
|
bool | milli_sleep (uint64_t td_ms, const bool ignore_irq=true) noexcept |
| millisecond sleep using high precision monotonic timer, useful for one-shot delays (only). More...
|
|
template<typename int_type > |
constexpr const fraction< int_type > & | min (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
| Return the minimum of the two given fractions. More...
|
|
constexpr const fraction_timespec & | min (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
| Return the minimum of the two given fraction_timespec. More...
|
|
const mp::BigInt & | min (const mp::BigInt &x, const mp::BigInt &y) noexcept |
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T >, bool > = true> |
constexpr T | min (const T x, const T y) noexcept |
| Returns the minimum of two integrals (w/ branching) in O(1) More...
|
|
mp::BigInt & | min (mp::BigInt &x, mp::BigInt &y) noexcept |
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr bool | mul_overflow (const T a, const T b, T &res) noexcept |
| Integer overflow aware multiplication returning true if overflow occurred, otherwise false having the result stored in res. More...
|
|
constexpr uint32_t | number (const func::target_type rhs) noexcept |
|
constexpr uint8_t | number (const TypeTraitGroup rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator!= (const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator!= (const callocator_sec< T1 > &lhs, const callocator_sec< T2 > &rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator!= (const counting_allocator< T1 > &lhs, const counting_allocator< T2 > &rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator!= (const counting_callocator< T1 > &lhs, const counting_callocator< T2 > &rhs) noexcept |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator!= (const cow_darray< Value_type, Size_type, Alloc_type > &rhs, const cow_darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator!= (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator!= (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Value_type , typename Alloc_type > |
bool | operator!= (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator!= (const darray< Value_type, Size_type, Alloc_type > &rhs, const darray< Value_type, Size_type, Alloc_type > &lhs) |
|
bool | operator!= (const EUI48 &lhs, const EUI48 &rhs) noexcept |
|
bool | operator!= (const EUI48Sub &lhs, const EUI48Sub &rhs) noexcept |
|
template<typename int_type > |
constexpr bool | operator!= (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
|
constexpr bool | operator!= (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
|
template<class R , class... A> |
bool | operator!= (const function< R(A...)> &lhs, std::nullptr_t) noexcept |
| Unequal operator of jau::function<R(A...)> with a right-hand-side nullptr. More...
|
|
template<typename Rl , typename... Al, template< typename... > typename Fl = function, typename Rr , typename... Ar, template< typename... > typename Fr = function> |
bool | operator!= (const function< Rl(Al...)> &lhs, const function< Rr(Ar...)> &rhs) noexcept |
| Unequal operator using two jau::function<R(A...)> types for both arguments. More...
|
|
constexpr bool | operator!= (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
|
template<class R , class... A> |
bool | operator!= (std::nullptr_t, const function< R(A...)> &rhs) noexcept |
| Unequal operator of jau::function<R(A...)> with a left-hand-side nullptr. More...
|
|
constexpr TypeTraitGroup | operator& (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
|
template<typename int_type > |
constexpr fraction< int_type > | operator* (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
| Returns product of two fraction. More...
|
|
template<typename int_type > |
constexpr fraction< int_type > | operator* (const fraction< int_type > &lhs, const int_type &rhs) noexcept |
| Returns multiplication of fraction with scalar. More...
|
|
template<typename int_type > |
constexpr fraction< int_type > | operator* (const int_type &lhs, const fraction< int_type > &rhs) noexcept |
| Returns multiplication of fraction with scalar. More...
|
|
template<typename int_type > |
constexpr fraction< int_type > | operator+ (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
| Returns sum of two fraction. More...
|
|
constexpr fraction_timespec | operator+ (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
| Returns sum of two fraction_timespec. More...
|
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr Storage_type::difference_type | operator- (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr Storage_type::difference_type | operator- (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename int_type > |
constexpr fraction< int_type > | operator- (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
| Returns difference of two fraction. More...
|
|
constexpr fraction_timespec | operator- (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
| Returns difference of two fraction_timespec. More...
|
|
template<typename int_type > |
constexpr fraction< int_type > | operator/ (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
| Returns division of two fraction. More...
|
|
template<typename int_type > |
constexpr fraction< int_type > | operator/ (const fraction< int_type > &lhs, const int_type &rhs) noexcept |
| Returns division of fraction with scalar. More...
|
|
template<typename int_type > |
constexpr fraction< int_type > | operator/ (const int_type &lhs, const fraction< int_type > &rhs) noexcept |
| Returns division of fraction with scalar. More...
|
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator< (const cow_darray< Value_type, Size_type, Alloc_type > &rhs, const cow_darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator< (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator< (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Value_type , typename Alloc_type > |
bool | operator< (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator< (const darray< Value_type, Size_type, Alloc_type > &rhs, const darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename int_type > |
constexpr bool | operator< (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
|
constexpr bool | operator< (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
std::ostream & | operator<< (std::ostream &out, const cow_darray< Value_type, Size_type, Alloc_type > &c) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
std::ostream & | operator<< (std::ostream &out, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &c) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
std::ostream & | operator<< (std::ostream &out, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &c) |
|
template<typename Value_type , typename Alloc_type > |
std::ostream & | operator<< (std::ostream &out, const cow_vector< Value_type, Alloc_type > &c) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
std::ostream & | operator<< (std::ostream &out, const darray< Value_type, Size_type, Alloc_type > &c) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator<= (const cow_darray< Value_type, Size_type, Alloc_type > &rhs, const cow_darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator<= (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator<= (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Value_type , typename Alloc_type > |
bool | operator<= (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator<= (const darray< Value_type, Size_type, Alloc_type > &rhs, const darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename int_type > |
constexpr bool | operator<= (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
|
constexpr bool | operator<= (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator== (const callocator< T1 > &lhs, const callocator< T2 > &rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator== (const callocator_sec< T1 > &lhs, const callocator_sec< T2 > &rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator== (const counting_allocator< T1 > &lhs, const counting_allocator< T2 > &rhs) noexcept |
|
template<class T1 , class T2 > |
bool | operator== (const counting_callocator< T1 > &lhs, const counting_callocator< T2 > &rhs) noexcept |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator== (const cow_darray< Value_type, Size_type, Alloc_type > &rhs, const cow_darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator== (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator== (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Value_type , typename Alloc_type > |
bool | operator== (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator== (const darray< Value_type, Size_type, Alloc_type > &rhs, const darray< Value_type, Size_type, Alloc_type > &lhs) |
|
bool | operator== (const EUI48 &lhs, const EUI48 &rhs) noexcept |
|
bool | operator== (const EUI48Sub &lhs, const EUI48Sub &rhs) noexcept |
|
template<typename int_type > |
constexpr bool | operator== (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
|
constexpr bool | operator== (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
|
template<class R , class... A> |
bool | operator== (const function< R(A...)> &lhs, std::nullptr_t) noexcept |
| Equal operator of jau::function<R(A...)> with a right-hand-side nullptr. More...
|
|
template<typename Rl , typename... Al, template< typename... > class Fl = function, typename Rr , typename... Ar, template< typename... > class Fr = function, std::enable_if_t< !std::is_same_v< Fl< Rl(Al...)>, Fr< Rr(Ar...)> >, bool > = true> |
bool | operator== (const function< Rl(Al...)> &lhs, const function< Rr(Ar...)> &rhs) noexcept |
| Equal operator using different jau::function<R(A...)> return and argument types for both arguments, always returns false. More...
|
|
constexpr bool | operator== (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
|
template<class R , class... A> |
bool | operator== (std::nullptr_t, const function< R(A...)> &rhs) noexcept |
| Equal operator of jau::function<R(A...)> with a left-hand-side nullptr. More...
|
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator> (const cow_darray< Value_type, Size_type, Alloc_type > &rhs, const cow_darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator> (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator> (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Value_type , typename Alloc_type > |
bool | operator> (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator> (const darray< Value_type, Size_type, Alloc_type > &rhs, const darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename int_type > |
constexpr bool | operator> (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
|
constexpr bool | operator> (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator>= (const cow_darray< Value_type, Size_type, Alloc_type > &rhs, const cow_darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator>= (const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Storage_type , typename Storage_ref_type , typename CoW_container > |
constexpr bool | operator>= (const cow_rw_iterator< Storage_type, Storage_ref_type, CoW_container > &lhs, const cow_ro_iterator< Storage_type, Storage_ref_type, CoW_container > &rhs) noexcept |
|
template<typename Value_type , typename Alloc_type > |
bool | operator>= (const cow_vector< Value_type, Alloc_type > &rhs, const cow_vector< Value_type, Alloc_type > &lhs) |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
bool | operator>= (const darray< Value_type, Size_type, Alloc_type > &rhs, const darray< Value_type, Size_type, Alloc_type > &lhs) |
|
template<typename int_type > |
constexpr bool | operator>= (const fraction< int_type > &lhs, const fraction< int_type > &rhs) noexcept |
|
constexpr bool | operator>= (const fraction_timespec &lhs, const fraction_timespec &rhs) noexcept |
|
constexpr TypeTraitGroup | operator^ (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
|
constexpr TypeTraitGroup | operator| (const TypeTraitGroup lhs, const TypeTraitGroup rhs) noexcept |
|
void | PLAIN_PRINT (const bool printPrefix, const char *format,...) noexcept |
| Use for unconditional plain messages, prefix '[elapsed_time] ' if printPrefix == true. More...
|
|
template<class Dest , class Source > |
constexpr std::enable_if_t< sizeof(Dest)==sizeof(Source) &&std::is_pointer_v< Source > &&std::is_pointer_v< Dest >, Dest > | pointer_cast (const Source &src) noexcept |
| A constexpr pointer cast implementation for C++17, inspired by C++20 bit_cast<>(arg) . More...
|
|
mp::BigInt | pow (mp::BigInt b, mp::BigInt e) |
|
void | print_backtrace (const bool skip_anon_frames, const jau::snsize_t max_frames=-1, const jau::snsize_t skip_frames=2) noexcept |
| Prints the de-mangled backtrace string separated by newline excluding this function to stderr, using get_backtrace(). More...
|
|
template<class List > |
void | printSharedPtrList (const std::string &prefix, List &list) noexcept |
|
constexpr void | put_uint128 (uint8_t *buffer, const uint128dp_t &v) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint128 (uint8_t *buffer, const uint128dp_t &v, const lb_endian_t byte_order) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint16 (uint8_t *buffer, const uint16_t v) noexcept |
| Put the given uint16_t value into the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
constexpr void | put_uint16 (uint8_t *buffer, const uint16_t v, const lb_endian_t byte_order) noexcept |
| Put the given uint16_t value into the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
constexpr void | put_uint192 (uint8_t *buffer, const uint192dp_t &v) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint192 (uint8_t *buffer, const uint192dp_t &v, const lb_endian_t byte_order) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint256 (uint8_t *buffer, const uint256dp_t &v) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint256 (uint8_t *buffer, const uint256dp_t &v, const lb_endian_t byte_order) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint32 (uint8_t *buffer, const uint32_t v) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint32 (uint8_t *buffer, const uint32_t v, const lb_endian_t byte_order) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint64 (uint8_t *buffer, const uint64_t &v) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint64 (uint8_t *buffer, const uint64_t &v, const lb_endian_t byte_order) noexcept |
| See put_uint16() for reference. More...
|
|
constexpr void | put_uint8 (uint8_t *buffer, const uint8_t v) noexcept |
|
template<typename T > |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, void > | put_value (uint8_t *buffer, const T &v) noexcept |
| Put the given T value into the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
template<typename T > |
constexpr std::enable_if_t< std::is_standard_layout_v< T >, void > | put_value (uint8_t *buffer, const T &v, const lb_endian_t byte_order) noexcept |
| Put the given T value into the given byte address using packed_t to resolve a potential memory alignment issue free of costs. More...
|
|
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
constexpr T | rad_to_adeg (const T rad) noexcept |
| Converts radians to arc-degree. More...
|
|
template<class ForwardIt , class UnaryPredicate > |
ForwardIt | remove_if (ForwardIt first, ForwardIt last, UnaryPredicate p) |
| Identical to C++20 std::remove_if() of algorithm More...
|
|
template<typename T , typename U , std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T > &&std::is_integral_v< U > &&std::is_unsigned_v< U >, bool > = true> |
constexpr T | round_down (T n, U align_to) |
| Round down w/ branching in O(1) More...
|
|
template<class T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
constexpr jau::sint_bytes< sizeof(T)>::type | round_to_int (const T v) noexcept |
| Returns the rounded value cast to int. More...
|
|
constexpr uint32_t | round_to_power_of_2 (const uint32_t n) |
| If the given n is not is_power_of_2() return next_power_of_2(), otherwise return n unchanged. More...
|
|
template<typename T , typename U , std::enable_if_t< std::is_integral_v< T > &&std::is_unsigned_v< T > &&std::is_integral_v< U > &&std::is_unsigned_v< U >, bool > = true> |
constexpr T | round_up (const T n, const U align_to) |
| Round up w/ branching in O(1) More...
|
|
template<typename T , std::enable_if_t< std::is_floating_point_v< T >, bool > = true> |
std::string & | row_to_string (std::string &sb, const std::string &f, const T a[], const jau::nsize_t rows, const jau::nsize_t columns, const bool rowMajorOrder, const jau::nsize_t row) noexcept |
| Appends a row of floating points to the given string sb More...
|
|
void | set_bit_uint32 (const uint8_t nr, uint32_t &mask) |
|
void | set_bit_uint64 (const uint8_t nr, uint64_t &mask) |
|
template<typename int_type > |
constexpr snsize_t | sign (const fraction< int_type > &rhs) noexcept |
| Returns the value of the sign function applied to numerator. More...
|
|
constexpr snsize_t | sign (const fraction_timespec &rhs) noexcept |
| Returns the value of the sign function applied to tv_sec. More...
|
|
template<typename T , std::enable_if_t< std::is_arithmetic_v< T > &&!std::is_unsigned_v< T >, bool > = true> |
constexpr int | sign (const T x) noexcept |
| Returns the value of the sign function (w/o branching ?) in O(1). More...
|
|
bool | sleep (const fraction_timespec &relative_time, const bool ignore_irq=true) noexcept |
| sleep using high precision monotonic timer, useful for one-shot delays (only). More...
|
|
bool | sleep_for (const fraction_i64 &relative_time, const bool monotonic=true, const bool ignore_irq=true) noexcept |
| sleep_for causes the current thread to block until a specific amount of time has passed. More...
|
|
bool | sleep_for (const fraction_timespec &relative_time, const bool monotonic=true, const bool ignore_irq=true) noexcept |
| sleep_for causes the current thread to block until a specific amount of time has passed. More...
|
|
bool | sleep_until (const fraction_timespec &absolute_time, const bool monotonic=true, const bool ignore_irq=true) noexcept |
| sleep_until causes the current thread to block until the specific time is reached. More...
|
|
std::vector< std::string > | split_string (const std::string &str, const std::string &separator) noexcept |
| Split given string str at separator into the resulting std::vector excluding the separator sequence . More...
|
|
template<typename T , std::enable_if_t< std::is_integral_v< T >, bool > = true> |
constexpr bool | sub_overflow (const T a, const T b, T &res) noexcept |
| Integer overflow aware subtraction returning true if overflow occurred, otherwise false having the result stored in res. More...
|
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
void | swap (cow_darray< Value_type, Size_type, Alloc_type > &rhs, cow_darray< Value_type, Size_type, Alloc_type > &lhs) noexcept |
|
template<typename Value_type , typename Alloc_type > |
void | swap (cow_vector< Value_type, Alloc_type > &rhs, cow_vector< Value_type, Alloc_type > &lhs) noexcept |
|
template<typename Value_type , typename Size_type , typename Alloc_type > |
void | swap (darray< Value_type, Size_type, Alloc_type > &rhs, darray< Value_type, Size_type, Alloc_type > &lhs) noexcept |
|
uint32_t | test_bit_uint32 (const uint8_t nr, const uint32_t mask) |
|
uint64_t | test_bit_uint64 (const uint8_t nr, const uint64_t mask) |
|
template<class value_type , std::enable_if_t< std::is_integral_v< value_type >, bool > = true> |
std::string | to_decstring (const value_type &v, const char separator=',', const nsize_t width=0) noexcept |
| Produce a decimal string representation of an integral integer value. More...
|
|
constexpr endian_t | to_endian (const lb_endian_t v) noexcept |
|
bool | to_fraction_i64 (fraction_i64 &result, const std::string &value, const fraction_i64 &min_allowed, const fraction_i64 &max_allowed) noexcept |
| Stores the fraction_i64 value of the given string value in format <num>/<denom> , which may contain whitespace. More...
|
|
template<class value_type , std::enable_if_t< std::is_pointer_v< value_type >, bool > = true> |
std::string | to_hexstring (value_type const &v) noexcept |
| Produce a lower-case hexadecimal string representation of the given pointer. More...
|
|
bool | to_integer (long long &result, const char *str, size_t str_len, const char limiter='\0', const char *limiter_pos=nullptr) |
|
bool | to_integer (long long &result, const std::string &str, const char limiter='\0', const char *limiter_pos=nullptr) |
|
constexpr lb_endian_t | to_lb_endian (const endian_t v) noexcept |
|
std::string | to_string (const endian_t v) noexcept |
| Return std::string representation of the given endian. More...
|
|
std::string | to_string (const EUI48 &a) noexcept |
|
std::string | to_string (const EUI48Sub &a) noexcept |
|
template<typename int_type > |
std::string | to_string (const fraction< int_type > &v) noexcept |
|
std::string | to_string (const fraction_timespec &v) noexcept |
|
std::string | to_string (const func::target_type v) noexcept |
|
std::string | to_string (const lb_endian_t v) noexcept |
| Return std::string representation of the given lb_endian. More...
|
|
template<typename _Tp , std::memory_order _MO> |
std::string | to_string (const ordered_atomic< _Tp, _MO > &ref) |
|
std::string | to_string (const uuid_t::TypeSize v) noexcept |
|
template<class value_type , std::enable_if_t< std::is_integral_v< value_type >||std::is_floating_point_v< value_type >, bool > = true> |
std::string | to_string (const value_type &ref) |
|
template<typename T > |
std::string | to_string (std::vector< T > const &list) |
|
template<typename T > |
std::string | to_string (std::vector< T > const &list, const std::string &delim) |
|
std::string | toLower (const std::string &s) noexcept |
|
std::string & | toLowerInPlace (std::string &s) noexcept |
|
std::string | trim (const std::string &s) noexcept |
| trim copy More...
|
|
void | trimInPlace (std::string &s) noexcept |
| trim in place More...
|
|
template<typename T > |
const char * | type_name () noexcept |
| Returns the type name of given type T using template Compile Time Type Information (CTTI) only via RTTI's typeid(T).name() if available or jau::ctti_name<T>() otherwise. More...
|
|
template<typename R , typename L , typename... A> |
const char * | type_name () noexcept |
| Returns the type name of given function types R(*L)(A...) using template Compile Time Type Information (CTTI) only via RTTI's typeid(L).name() if available or jau::ctti_name<R, L, A...>() otherwise. More...
|
|
std::string | vformat_string (const char *format, va_list ap) noexcept |
| Returns a string according to vprintf() formatting rules using va_list instead of a variable number of arguments. More...
|
|
std::cv_status | wait_for (std::condition_variable &cv, std::unique_lock< std::mutex > &lock, const fraction_i64 &relative_time, const bool monotonic=true) noexcept |
| wait_for causes the current thread to block until the condition variable is notified, a specific amount of time has passed, or a spurious wakeup occurs. More...
|
|
std::cv_status | wait_for (std::condition_variable &cv, std::unique_lock< std::mutex > &lock, const fraction_timespec &relative_time, const bool monotonic=true) noexcept |
| wait_for causes the current thread to block until the condition variable is notified, a specific amount of time has passed, or a spurious wakeup occurs. More...
|
|
std::cv_status | wait_until (std::condition_variable &cv, std::unique_lock< std::mutex > &lock, const fraction_timespec &absolute_time, const bool monotonic=true) noexcept |
| wait_until causes the current thread to block until the condition variable is notified, a specific time is reached, or a spurious wakeup occurs. More...
|
|
void | WARN_PRINT_impl (const char *func, const char *file, const int line, const char *format,...) noexcept |
|
void | WARN_PRINTv (const char *func, const char *file, const int line, const char *format, va_list args) noexcept |
| Use for unconditional warning messages, prefix '[elapsed_time] Warning @ file:line func: '. More...
|
|
void | WORDY_PRINT_impl (const char *format,...) noexcept |
|