native 0.0.1
Vectors, masks and wide register packs for C++26
Loading...
Searching...
No Matches
native::predicate< N, A > Struct Template Referenceexport

Compact logical mask for register-only instruction shapes. More...

Collaboration diagram for native::predicate< N, A >:
[legend]

Public Member Functions

constexpr predicate () noexcept=default
 Construct an empty mask.
constexpr predicate (bool value) noexcept
 Broadcast one Boolean value to every logical lane.
constexpr native_type to_native () const noexcept
 Return the compact implementation representation.
constexpr std::uint64_t bits () const noexcept
 Return one bit per logical lane.
constexpr std::uint64_t to_bitset () const noexcept
 Return the logical lane bitset.
constexpr predicate & operator&= (predicate b) noexcept
 Intersect with another mask in place.
constexpr predicate & operator|= (predicate b) noexcept
 Unite with another mask in place.
constexpr predicate & operator^= (predicate b) noexcept
 Toggle lanes present in another mask.

Static Public Member Functions

static constexpr predicate from_bits (std::uint64_t bits) noexcept
 Read one bit per lane and clear bits above the logical lane count.
static constexpr predicate from_bitset (std::uint64_t bits) noexcept
 Construct from the logical lane bitset.
static constexpr predicate from_native (native_type bits) noexcept
 Adopt the compact representation, clearing unused bits.

Friends

constexpr bool any (predicate p) noexcept
 Test whether any logical lane is set.
constexpr bool all (predicate p) noexcept
 Test whether every logical lane is set.
constexpr bool none (predicate p) noexcept
 Test whether every logical lane is clear.
constexpr predicate operator~ (predicate p) noexcept
 Complement logical lanes, leaving padding clear.
constexpr predicate operator! (predicate p) noexcept
 Complement each logical lane.
constexpr predicate operator& (predicate a, predicate b) noexcept
 Intersect the logical lane masks.
constexpr predicate operator| (predicate a, predicate b) noexcept
 Unite the logical lane masks.
constexpr predicate operator^ (predicate a, predicate b) noexcept
 Toggle lanes present in exactly one operand.
constexpr predicate operator== (predicate a, predicate b) noexcept
 Mark lanes whose truth values agree.
constexpr predicate operator!= (predicate a, predicate b) noexcept
 Mark lanes whose truth values differ.
constexpr predicate select (predicate p, predicate a, predicate b) noexcept
 Choose each mask lane from a or b according to p.

Detailed Description

template<std::size_t N, isa<> A>
requires detail::instruction_predicate_shape<N,A>
struct native::predicate< N, A >

Compact logical mask for register-only instruction shapes.

Definition at line 900 of file native.simd.ccm.


The documentation for this struct was generated from the following file: