E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches
eve::logical< T > Struct Template Reference

Wrapper for SIMD compatible logical types. More...

#include <eve/arch/cpu/logical.hpp>

Detailed Description

template<plain_scalar_value T>
struct eve::logical< T >

Required header: #include <eve/logical.hpp>

eve::logical is an architecture-agnostic representation of a boolean mask and provides standardized API to access informations, compute values and manipulate such mask. Contrary to bool, an instance of logical has the same sizeof as T, allowing seamless interaction with an instance eve::logical<eve::wide< T >>.

Template Parameters
TType of value to store a mask from

Public Types

using value_type = T
 The type associated to the boolean mask.
 
using mask_type = T
 The type representing the numerical value of mask.
 
using bits_type = as_integer_t<T, unsigned>
 The type representing the bitwise representation of the mask.
 

Public Member Functions

Constructors
constexpr logical () noexcept
 Default constructor.
 
constexpr logical (bool v) noexcept
 Construct from a bool
 
template<plain_scalar_value U>
constexpr logical (U const &v) noexcept
 Construct from a plain_scalar_value.
 
Assignment operators
constexpr logicaloperator= (bool v) &noexcept
 Assign a bool