native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
native.numerics Module Reference

Scalar half storage, numeric limits and legacy scalar predicates. More...

Exported Modules

module  native.types

Concepts

concept  native::one_of
 N is one of the candidates
concept  native::not_one_of
 N is not one of the candidates

Classes

struct  native::fp16
struct  native::mask_traits< fp16 >
class  std::numeric_limits<::native::fp16 >
struct  native::bf16
struct  native::mask_traits< bf16 >
class  std::numeric_limits<::native::bf16 >

Enumerations

enum class  native::CMPINT : std::size_t {
  native::CMPINT::EQ = 0x0uz , native::CMPINT::LT = 0x1uz , native::CMPINT::LE = 0x2uz , native::CMPINT::FALSE = 0x3uz ,
  native::CMPINT::NE = 0x4uz , native::CMPINT::NLT = 0x5uz , native::CMPINT::NLE = 0x6uz , native::CMPINT::TRUE = 0x7uz
}
 Scalar integer-comparison predicates, encoded like the corresponding x86 immediates. More...
enum class  native::CMP : std::size_t {
  native::CMP::EQ_OQ = 0x00uz , native::CMP::LT_OS = 0x01uz , native::CMP::LE_OS = 0x02uz , native::CMP::UNORD_Q = 0x03uz ,
  native::CMP::NEQ_UQ = 0x04uz , native::CMP::NLT_US = 0x05uz , native::CMP::NLE_US = 0x06uz , native::CMP::ORD_Q = 0x07uz ,
  native::CMP::EQ_UQ = 0x08uz , native::CMP::NGE_US = 0x09uz , native::CMP::NGT_US = 0x0Auz , native::CMP::FALSE_OQ = 0x0Buz ,
  native::CMP::NEQ_OQ = 0x0Cuz , native::CMP::GE_OS = 0x0Duz , native::CMP::GT_OS = 0x0Euz , native::CMP::TRUE_UQ = 0x0Fuz ,
  native::CMP::EQ_OS = 0x10uz , native::CMP::LT_OQ = 0x11uz , native::CMP::LE_OQ = 0x12uz , native::CMP::UNORD_S = 0x13uz ,
  native::CMP::NEQ_US = 0x14uz , native::CMP::NLT_UQ = 0x15uz , native::CMP::NLE_UQ = 0x16uz , native::CMP::ORD_S = 0x17uz ,
  native::CMP::EQ_US = 0x18uz , native::CMP::NGE_UQ = 0x19uz , native::CMP::NGT_UQ = 0x1Auz , native::CMP::FALSE_OS = 0x1Buz ,
  native::CMP::NEQ_OS = 0x1Cuz , native::CMP::GE_OQ = 0x1Duz , native::CMP::GT_OQ = 0x1Euz , native::CMP::TRUE_US = 0x1Fuz
}
 Scalar floating-comparison predicates, including ordered and unordered truth tables. More...

Typedefs

template<typename T>
using native::int_t
template<typename T>
using native::uint_t

Functions

constexpr fp16 native::operator""_fp16 (long double v) noexcept
 Round a literal through binary32 to fp16.
constexpr bool std::isnan (::native::fp16 x) noexcept
 Classify the stored bits as NaN without performing a floating-point conversion.
constexpr bf16 native::operator""_bf16 (long double v) noexcept
 Round a literal through binary32 to bf16.
constexpr bf16 native::fast_to_bf16 (float f) noexcept
constexpr bf16 native::fast_to_bf16 (bf16 f) noexcept
 Return an already converted bfloat16 unchanged.
constexpr bool std::isnan (::native::bf16 x) noexcept
 Classify the stored bits as NaN without performing a floating-point conversion.
template<typename T>
constexpr bool native::cmp_unord (T a, T b) noexcept(noexcept(isnan(a)||isnan(b)))
 Return true if either argument is NaN.
template<typename T>
constexpr bool native::cmp_ord (T a, T b) noexcept(noexcept(!isnan(a) &&!isnan(b)))
 Return true if neither argument is NaN.
template<one_of_t< float, double > T>
constexpr T native::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> && (std::size_t(imm8) < 8uz))
constexpr bool native::cmpint (T a, T b) noexcept
template<CMP imm8, typename T>
requires (one_of_t<T, float, double> && (std::size_t(imm8) < 32uz))
constexpr bool native::cmp (T a, T b) noexcept

Variables

constexpr std::size_t native::max_fp_comparison_predicate

Detailed Description

Scalar half storage, numeric limits and legacy scalar predicates.

Files

file  src/native.numerics.ccm