Embedded Template Library 1.0
Loading...
Searching...
No Matches
rounded_integral_division.h File Reference
#include "platform.h"
#include "type_traits.h"
#include "absolute.h"
#include "utility.h"

Go to the source code of this file.

Namespaces

namespace  etl
 bitset_ext

Functions

template<typename T>
ETL_CONSTEXPR etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, bool >::type etl::private_rounded_integral_division::are_same_sign (T a, T b) ETL_NOEXCEPT
template<typename T>
ETL_CONSTEXPR etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, bool >::type etl::private_rounded_integral_division::are_same_sign (T, T) ETL_NOEXCEPT
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, T >::type etl::divide_round_to_ceiling (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to ceiling. For signed integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_signed< T1 >::value &&etl::is_signed< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_to_ceiling (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to ceiling. For signed integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_to_ceiling (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to ceiling. For unsigned integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_unsigned< T1 >::value &&etl::is_unsigned< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_to_ceiling (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to ceiling. For unsigned integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, T >::type etl::divide_round_to_floor (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to floor. For signed integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_signed< T1 >::value &&etl::is_signed< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_to_floor (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to floor. For signed integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_to_floor (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to floor. For unsigned integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_unsigned< T1 >::value &&etl::is_unsigned< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_to_floor (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to floor. For unsigned integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, T >::type etl::divide_round_to_infinity (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding towards infinity. For signed integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_signed< T1 >::value &&etl::is_signed< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_to_infinity (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding towards infinity. For signed integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_to_infinity (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding towards infinity. For unsigned integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_unsigned< T1 >::value &&etl::is_unsigned< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_to_infinity (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding towards infinity. For unsigned integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_to_zero (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding towards zero. For integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_to_zero (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding towards zero. For integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, T >::type etl::divide_round_half_up (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half up. For signed integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_signed< T1 >::value &&etl::is_signed< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_up (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half up. For signed integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_half_up (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half up. For unsigned integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_unsigned< T1 >::value &&etl::is_unsigned< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_up (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half up. For unsigned integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, T >::type etl::divide_round_half_down (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half down. For signed integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_signed< T1 >::value &&etl::is_signed< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_down (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half down. For signed integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_half_down (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half down. For unsigned integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_unsigned< T1 >::value &&etl::is_unsigned< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_down (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half down. For unsigned integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, T >::type etl::divide_round_half_even (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half even. For signed integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_signed< T1 >::value &&etl::is_signed< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_even (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half even. For signed integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_half_even (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half even. For unsigned integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_unsigned< T1 >::value &&etl::is_unsigned< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_even (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half even. For unsigned integral types. For different argument types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_signed< T >::value, T >::type etl::divide_round_half_odd (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half odd. For signed integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_signed< T1 >::value &&etl::is_signed< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_odd (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half odd. For signed integral types. For different parameter types.
template<typename T>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T >::value &&etl::is_unsigned< T >::value, T >::type etl::divide_round_half_odd (T numerator, T denominator) ETL_NOEXCEPT
 Integral division with rounding to half odd. For unsigned integral types. For identical argument types.
template<typename T1, typename T2>
ETL_CONSTEXPR14 etl::enable_if< etl::is_integral< T1 >::value &&etl::is_integral< T2 >::value &&etl::is_unsigned< T1 >::value &&etl::is_unsigned< T2 >::value, typenameetl::common_type< T1, T2 >::type >::type etl::divide_round_half_odd (T1 numerator, T2 denominator) ETL_NOEXCEPT
 Integral division with rounding to half odd. For unsigned integral types. For different argument types.