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

Namespaces

namespace  native
 Architecture-tagged vectors, register packs and supporting value types. Native arithmetic follows its architecture tag and instruction-set preconditions. Common utilities do not select or admit a runtime CPU profile.

Concepts

concept  native::one_of_t
 type T is one of the candidates
concept  native::not_one_of_t
 type T is not one of the candidates

Classes

struct  native::mask_traits< fp16 >
struct  native::mask_traits< bf16 >
struct  native::mask_traits< T >
struct  native::mask_traits< T >
struct  native::mask_traits< std::array< T, N > >

Typedefs

template<class T>
using native::mask = typename mask_traits<std::remove_cvref_t<T>>::type

Functions

std::string_view native::type_of (auto const &t)

Variables

template<typename T>
std::string_view const native::type

Detailed Description

Typedef Documentation

◆ mask

template<class T>
using native::mask = typename mask_traits<std::remove_cvref_t<T>>::type

The logical mask associated with T, ignoring its cv/ref qualifiers.

Definition at line 22 of file mask_traits.h.

Function Documentation

◆ type_of()

std::string_view native::type_of ( auto const & t)
export

Return the cached display name of the argument's cv/ref-stripped static type. The argument is not inspected. This does not perform dynamic type discovery.

Definition at line 65 of file native.types.ccm.

Here is the caller graph for this function:

Variable Documentation

◆ type

template<typename T>
std::string_view const native::type
inlineexport

Return a cached display name for T with static lifetime. Demangle where the platform exposes that facility; otherwise retain typeid's spelling. This is a diagnostic label, not a stable persistence identifier. Initialization owns a string and may allocate.

void common_utilities() {
using namespace native;
auto first = "vector"_ss;
auto second = "vector"_ss;
check(first == second && first.data() == second.data());
check(std::hash<static_string>{}(first) == std::hash<static_string>{}(second));
auto owned = native::dup(first.data());
if (owned) check(std::string_view(owned.get()) == "vector");
check(!native::type_of(first).empty());
auto half = native::fp16(1.5f);
check(static_cast<float>(half) == 1.5f);
}

Ideally this would be fully constexpr, but I'm not building my own demangler.

Definition at line 40 of file native.types.ccm.