|
native 0.0.1
Vectors, masks and wide register packs for C++26
|
#include <simd_family.h>
Public Member Functions | |
| template<std::size_t A = 1> | |
| constexpr void | store_memory (bool *p) const noexcept |
| Store exactly the logical lanes; the template alignment is a caller promise, never permission to write padding. | |
| constexpr | simd () noexcept |
| Initialize every logical lane to false. | |
| constexpr | simd (bool value) noexcept |
| Broadcast the supplied truth value to every logical lane. | |
|
template<class... X> requires (N>1 && sizeof...(X)==N) && (std::same_as<X,bool>&&...) | |
| constexpr | simd (X... value) noexcept |
| Construct logical lanes in argument order. Any element conversions determine the exception specification. | |
| constexpr | simd (std::array< bool, N > const &value) noexcept |
| Read all logical lanes from an unaligned element pointer. | |
| constexpr native_type | to_native () const noexcept |
| Return the native storage representation. | |
| constexpr void | store (bool *p) const noexcept |
| Write all logical lanes to an unaligned element pointer. | |
| constexpr void | store_partial (bool *p, std::size_t count) const noexcept |
| Write exactly n logical lanes; require n <= lanes. For n == 0, p may be null. | |
| constexpr simd & | operator&= (simd b) noexcept |
| Apply the corresponding lane-wise AND operation in place and return *this. | |
| constexpr simd & | operator|= (simd b) noexcept |
| Apply the corresponding lane-wise OR operation in place and return *this. | |
| constexpr simd & | operator^= (simd b) noexcept |
| Apply the corresponding lane-wise XOR operation in place and return *this. | |
Static Public Member Functions | |
| template<std::size_t A = 1> | |
| static constexpr simd | load_memory (bool const *p) noexcept |
| Load exactly the logical lanes; the template alignment is a caller promise, never permission to read padding. | |
| static constexpr simd | from_native (native_type value) noexcept |
| Import native byte lanes, converting each nonzero byte to Boolean one. | |
| static constexpr simd | unsafe_from_native (native_type value) noexcept |
| Adopt storage with the precondition that every Boolean byte is zero or one. | |
| static constexpr simd | load (bool const *p) noexcept |
| Read all logical lanes from an unaligned element pointer. | |
| static constexpr simd | load_partial (bool const *p, std::size_t count, bool fill=false) noexcept |
| Read exactly n logical lanes and fill the remainder; require n <= lanes. For n == 0, p may be null. | |
Friends | |
| constexpr simd | operator! (simd a) noexcept |
| Return the lane-wise logical complement, retaining this mask type. | |
| constexpr simd | operator~ (simd a) noexcept |
| Invert each lane truth value, preserving the mask representation. | |
| constexpr simd | operator& (simd a, simd b) noexcept |
| Bitwise AND of corresponding lane representations. | |
| constexpr simd | operator| (simd a, simd b) noexcept |
| Bitwise OR of corresponding lane representations. | |
| constexpr simd | operator^ (simd a, simd b) noexcept |
| Bitwise XOR of corresponding lane representations. | |
| constexpr mask_type | operator!= (simd a, simd b) noexcept |
| Return a mask whose lanes are true where a != b holds. | |
| constexpr mask_type | operator== (simd a, simd b) noexcept |
| Return a mask whose lanes are true where a == b holds. | |
| constexpr bool | any (simd a) noexcept |
| Return whether at least one logical lane is true. | |
| constexpr bool | all (simd a) noexcept |
| Return whether every logical lane is true. | |
| constexpr bool | none (simd a) noexcept |
| Return true exactly when no logical lane is true. | |
| template<class M> requires (std::same_as<M,mask_type> || std::same_as<M,vector_mask_type>) | |
| constexpr simd | select (M m, simd a, simd b) |
| Choose a in true lanes and b in false lanes; both values are already evaluated. | |
Boolean data stores one byte, zero or one, per lane. Use explicit conversions to cross into full masks or compact predicates.
Definition at line 881 of file simd_family.h.
|
friend |
Choose a in true lanes and b in false lanes; both values are already evaluated.
Choose a in true lanes and b in false lanes; both operands are evaluated.
Definition at line 984 of file simd_family.h.