The cheapest to get bitset for simd logical. More...
One value in top bits can be represented by multiple bits (bits_per_element member constant).
NOTE: this is a generalization of movemask instructions from x86
Typical usage: created with CTAD: top_bits{logical}.
| Logical | simd value. |
Public Types | |
| using | logical_type = Logical |
| The associated wide logical. | |
| using | scalar_type = typename as_arithmetic_t< logical_type >::value_type |
| For top_bits<logical<wide<T, N>>> this is T;. | |
| using | abi_type = typename as_arithmetic_t< logical_type >::abi_type |
| ABI of the underlying simd value. | |
| using | half_logical = logical< wide< scalar_type, eve::fixed< half_size > > > |
| logical of half size (or 1 if size is 1) | |
| using | storage_type = decltype(top_bits::storage_type_impl()) |
| type of the underlying storage | |
Public Member Functions | |
| constexpr void | set (std::ptrdiff_t i, bool x) |
| setter | |
Static Public Attributes | |
| static constexpr std::ptrdiff_t | static_size = logical_type::size() |
| logical_type::size(); | |
| static constexpr bool | is_aggregated |
| is stored as an array of 2 halves | |
| static constexpr std::ptrdiff_t | bits_per_element = bits_per_element_impl() |
| how many bits do we store per element | |
| static constexpr std::ptrdiff_t | static_bits_size = static_size * bits_per_element |
| how many bits are used | |
| static constexpr bool | is_cheap = is_cheap_impl() |
| is it considered a cheap operation (~1 instruction) to get top_bits from a logical. | |