一呼百應, "one call, a hundred responses"
Loading...
Searching...
No Matches
std Namespace Reference

Namespaces

namespace  detail
 
namespace  ranges
 

Classes

struct  hash<::ein::basic_static_string< CharT, Traits > >
 
struct  hash<::ein::static_c_string >
 
class  numeric_limits< ein::bf16 >
 
class  numeric_limits< ein::fp16 >
 
struct  tuple_element< I, ein::simd< T, N > >
 needed to support for std::apply More...
 
struct  tuple_size< ein::simd< T, N > >
 

Functions

constexpr bool isnan (ein::bf16 x) noexcept
 
constexpr bool isnan (ein::fp16 x) noexcept
 
template<typename T >
constexpr auto forward_like (auto &&x) noexcept -> detail::forward_like_t< T, decltype(x)>
 Returns a reference to x which has similar properties to T&&.
 

Function Documentation

◆ forward_like()

template<typename T >
auto std::forward_like ( auto && x) -> detail::forward_like_t<T, decltype(x)>
nodiscardconstexprnoexcept

Returns a reference to x which has similar properties to T&&.

The return type is determined as below:

If std::remove_reference_t<T> is a const-qualified type, then the referenced type of the return type is const std::remove_reference_t<U>. Otherwise, the referenced type is std::remove_reference_t<U>.

If T&& is an lvalue reference type, then the return type is also an lvalue reference type.

Otherwise, the return type is an rvalue reference type.

If T is not a referenceable type, the program is ill-formed.

Template Parameters
Tthe type to copy qualifications from
Parameters
xa value needs to be forwarded like type T
Returns
a reference to x of the type determined as above.
Since
2022-07L __cpp_lib_forward_like

Definition at line 53 of file forward_like.hpp.

53 {
54 return static_cast<detail::forward_like_t<T, decltype(x)>>(x);
55 }
override_ref_t< T &&, copy_const_t< T, remove_reference_t< U > > > forward_like_t

◆ isnan() [1/2]

bool std::isnan ( ein::bf16 x)
constexprnoexcept[[nodiscard]][[artificial]][[always_inline]][[const]]

Definition at line 131 of file bf16.hpp.

131 {
132 // Exponent maxed out and fraction non-zero indicates NaN
133 return (x.to_bits() & 0x7FFF) > 0x7F80;
134 }
constexpr uint16_t to_bits(this bf16 self) noexcept
Definition bf16.hpp:103

Referenced by ein::cmp_ord(), ein::cmp_unord(), and ein::scalef().

Here is the caller graph for this function:

◆ isnan() [2/2]

bool std::isnan ( ein::fp16 x)
constexprnoexcept[[nodiscard]][[artificial]][[always_inline]][[const]]

Definition at line 117 of file fp16.hpp.

117 {
118 // Sign doesn't matter, frac not zero (infinity)
119 return (x.to_bits() & 0x7FFF) > 0x7c00;
120 }
constexpr uint16_t to_bits(this fp16 self) noexcept
Definition fp16.hpp:102