Concepts | |
concept | ein::one_of |
N is one of the candidates | |
concept | ein::not_one_of |
N is not one of the candidates | |
Classes | |
struct | ein::imm_t< N > |
A compile time constant passed as an empty struct. More... | |
Typedefs | |
template<typename T > | |
using | ein::int_t |
returns a signed integer type of the same size as T suitable for std::bitcast | |
template<typename T > | |
using | ein::uint_t |
returns an unsigned integer type of the same size as T suitable for std::bitcast | |
Functions | |
template<typename T > | |
constexpr bool | ein::cmp_unord (T a, T b) noexcept |
Return true if either argument is NaN. | |
template<typename T > | |
constexpr bool | ein::cmp_ord (T a, T b) noexcept |
Return true if neither argument is NaN. | |
template<one_of_t< float, double > T> | |
constexpr T | ein::scalef (T x, T y) noexcept |
template<CMPINT imm8, typename T > requires (one_of_t<T,uint8_t,int8_t,uint16_t,int16_t,uint32_t,int32_t,uint64_t,int64_t> && (size_t(imm8) < 8uz)) | |
constexpr bool | ein::cmpint (T a, T b) noexcept |
template<CMP imm8, typename T > requires (one_of_t<T,float,double> && (size_t(imm8) < 32uz)) | |
constexpr bool | ein::cmp (T a, T b) noexcept |
perform an avx512 style floating point comparison for scalar values. | |
Variables | |
template<size_t N> | |
constinit imm_t< N > | ein::imm {} |
A compile time constant passed as an empty struct. | |
constexpr size_t | ein::max_fp_comparison_predicate |
AVX512 added many more floating point comparison types. Do we have them? | |
struct ein::imm_t |
A compile time constant passed as an empty struct.
Definition at line 61 of file numerics.hpp.
Public Member Functions | |
consteval | operator size_t () const noexcept |
Static Public Attributes | |
static constexpr size_t | value = N |
|
inlineconstevalnoexcept[[nodiscard]][[always_inline]][[const]][[artificial]] |
Definition at line 64 of file numerics.hpp.
|
staticconstexpr |
Definition at line 62 of file numerics.hpp.
using ein::int_t |
returns a signed integer type of the same size as T
suitable for std::bitcast
Definition at line 51 of file numerics.hpp.
using ein::uint_t |
returns an unsigned integer type of the same size as T
suitable for std::bitcast
Definition at line 57 of file numerics.hpp.
|
strong |
Definition at line 193 of file numerics.hpp.
|
strong |
Enumerator | |
---|---|
EQ |
|
LT |
|
LE |
|
FALSE | always |
NE |
|
NLT |
|
NLE |
|
TRUE | always |
Definition at line 161 of file numerics.hpp.
|
constexprnoexcept |
perform an avx512 style floating point comparison for scalar values.
Definition at line 232 of file numerics.hpp.
References ein::cmp_ord(), ein::cmp_unord(), ein::EQ_OQ, ein::EQ_OS, ein::EQ_UQ, ein::EQ_US, ein::FALSE_OQ, ein::FALSE_OS, ein::GE_OQ, ein::GE_OS, ein::GT_OQ, ein::GT_OS, ein::LE_OQ, ein::LE_OS, ein::LT_OQ, ein::LT_OS, ein::NEQ_OQ, ein::NEQ_OS, ein::NEQ_UQ, ein::NEQ_US, ein::NGE_UQ, ein::NGE_US, ein::NGT_UQ, ein::NGT_US, ein::NLE_UQ, ein::NLE_US, ein::NLT_UQ, ein::NLT_US, ein::ORD_Q, ein::ORD_S, ein::TRUE_UQ, ein::TRUE_US, ein::UNORD_Q, and ein::UNORD_S.
|
constexprnoexcept[[nodiscard]][[always_inline]][[pure]] |
Return true if neither argument is NaN.
This corresponds to checking if the two arguments are "ordered" with respect to the IEEE floating point comparison predicates
Definition at line 102 of file numerics.hpp.
References std::isnan().
|
constexprnoexcept[[nodiscard]][[always_inline]][[pure]] |
Return true if either argument is NaN.
This corresponds to checking if the two arguments are "unordered" with respect to the IEEE floating point comparison predicates
Definition at line 85 of file numerics.hpp.
References std::isnan().
|
constexprnoexcept |
Definition at line 175 of file numerics.hpp.
References ein::EQ, ein::FALSE, ein::LE, ein::LT, ein::NE, ein::NLE, ein::NLT, and ein::TRUE.
|
constexprnoexcept[[nodiscard]][[always_inline]][[pure]] |
Definition at line 114 of file numerics.hpp.
References std::isnan().
|
constinit |
A compile time constant passed as an empty struct.
Allow passing immediate values to operators without having to give up x << y
as a syntactic form. xs << imm<n>
isn't much of an imposition and ensures the compiler knows that N
is a fixed constant known at compile time
Definition at line 75 of file numerics.hpp.
|
constexpr |
AVX512 added many more floating point comparison types. Do we have them?
Definition at line 190 of file numerics.hpp.