These functions are low level and acting on the bit or byte representation of the involved data independently of their type.
bit_and, bit_andnot, bit_cast, bit_ceil, bit_flip,bit_floor, bit_mask, bit_not, bit_notand, bit_notor, bit_or. bit_ornot, bit_reverse, bit_select, bit_set, shl, bit_shr, bit_swap_adjacent, bit_swap_pairs, bit_ternary, bit_unset, bit_width, bit_xor. byte_reverse, byte_swap_adjacent, byte_swap_pairs, countl_one, countl_zero, countr_one, countr_zero.
Variables | |
| constexpr auto | eve::bit_and = functor<bit_and_t> |
| bit_callable object computing the bitwise AND of its arguments. | |
| constexpr auto | eve::bit_andnot = functor<bit_andnot_t> |
| bit_callable object computing the bitwise ANDNOT of its arguments. | |
| constexpr auto | eve::bit_cast = functor<bit_cast_t> |
| Computes a bitwise reinterpretation of an object. | |
| constexpr auto | eve::bit_ceil = functor<bit_ceil_t> |
| elementwise_callable object computing the smallest integral power of two that is not smaller than x. | |
| constexpr auto | eve::bit_flip = functor<bit_flip_t> |
| strict_elementwise_callable object flipping the value the ith bit of each element. | |
| constexpr auto | eve::bit_floor = functor<bit_floor_t> |
| elementwise_callable object computing, if x is not zero, the largest integral power of two that is not greater than x. | |
| constexpr auto | eve::bit_mask = functor<bit_mask_t> |
| elementwise_callable object computing a bit mask full of zeroes or ones | |
| constexpr auto | eve::bit_not = functor<bit_not_t> |
| elementwise_callable object computing the one complement of the parameter. | |
| constexpr auto | eve::bit_notand = functor<bit_notand_t> |
| bit_callable object computing the bitwise NOTAND of its arguments. | |
| constexpr auto | eve::bit_notor = functor<bit_notor_t> |
| bit_callable object computing the bitwise NOTOR of its arguments. | |
| constexpr auto | eve::bit_or = functor<bit_or_t> |
| bit_callable object computing the bitwise OR of its arguments. | |
| constexpr auto | eve::bit_ornot = functor<bit_ornot_t> |
| bit_callable object Computing the bitwise ORNOT of its arguments. | |
| constexpr auto | eve::bit_reverse = functor<bit_reverse_t> |
| strict_elementwise_callable object reversing the bit order. | |
| constexpr auto | eve::bit_select = functor<bit_select_t> |
| strict_elementwise_callable object selecting bits from a mask and two entries. | |
| constexpr auto | eve::bit_set = functor<bit_set_t> |
| strict_elementwise_callable object setting to 1 the ith bit of each element. | |
| constexpr auto | eve::bit_shl = functor<shl_t> |
| strict_elementwise_callable object computing a logical left shift. | |
| constexpr auto | eve::bit_shr = functor<bit_shr_t> |
| strict_elementwise_callable object computing a logical right shift. | |
| constexpr auto | eve::bit_swap_adjacent = functor<bit_swap_adjacent_t> |
| strict_elementwise_callable object swapping adjacent groups of n bits. | |
| constexpr auto | eve::bit_swap_pairs = functor<bit_swap_pairs_t> |
| strict_elementwise_callable object swapping pairs. | |
| constexpr auto | eve::bit_ternary = functor<bit_ternary_t> |
| callable object implementing ternary logic. | |
| constexpr auto | eve::bit_unset = functor<bit_unset_t> |
| strict_elementwise_callable object setting to 01 the ith bit of each element. | |
| constexpr auto | eve::bit_width = functor<bit_width_t> |
| elementwise_callable object Computing elementwise the number of bits needed to store the parameter. | |
| constexpr auto | eve::bit_xor = functor<bit_xor_t> |
| bit_callable object computing the bitwise XOR of its arguments. | |
| constexpr auto | eve::byte_reverse = functor<byte_reverse_t> |
| elementwise_callable object reversing the byte order. | |
| constexpr auto | eve::byte_swap_adjacent = functor<byte_swap_adjacent_t> |
| strict_elementwise_callable object that swap adjacent groups of N bytes. | |
| constexpr auto | eve::byte_swap_pairs = functor<byte_swap_pairs_t> |
| strict_elementwise_callable object swapping chosen pairs of bytes in each vector element. | |
| constexpr auto | eve::countl_one = functor<countl_one_t> |
| elementwise_callable object computing the number of consecutive bits set in a value starting from left | |
| constexpr auto | eve::countl_zero = functor<countl_zero_t> |
| elementwise_callable object computing the number of consecutive bits unset in a value starting from left | |
| constexpr auto | eve::countr_one = functor<countr_one_t> |
| elementwise_callable object computing the number of consecutive bits set in a value starting from right. | |
| constexpr auto | eve::countr_zero = functor<countr_zero_t> |
| elementwise_callable object computing the number of consecutive bits unset in a value starting from right. | |
| constexpr auto | eve::firstbitset = functor<firstbitset_t> |
| Computes elementwise the bit pattern in which the only bit set (if it exists) is the first bit set in the input. | |
| constexpr auto | eve::firstbitunset = functor<firstbitunset_t> |
| Computes elementwise the bit pattern in which the only bit set (if it exists) is the first bit unset in the input. | |
| constexpr auto | eve::hi = functor<hi_t> |
| elementwise_callable computing the most significant half of each lane. | |
| constexpr auto | eve::lo = functor<lo_t> |
| Computes the least significant half of each lane. | |
| constexpr auto | eve::lohi = functor<lohi_t> |
| elementwise_callable computing the lohi pair of values. | |
| constexpr auto | eve::popcount = functor<popcount_t> |
| elementwise_callable object computing elementwise the number of bits set in the parameter. | |
| constexpr auto | eve::rotl = functor<rotl_t> |
| Bitwise rotation to the left. | |
| constexpr auto | eve::rotr = functor<rotr_t> |
| Bitwise rotation to the right. | |
| constexpr auto | eve::rshl = functor<rshl_t> |
| Computes the arithmetic left/right shift operation according to shift sign. | |
| constexpr auto | eve::rshr = functor<rshr_t> |
| Computes the arithmetic right/left shift operation according to shift sign. | |
| constexpr auto | eve::shl = functor<shl_t> |
| Computes the arithmetic left shift operation. | |
| constexpr auto | eve::shr = functor<shr_t> |
| Computes the arithmetic right shift operation. | |
| constexpr auto | eve::swap_pairs = functor<swap_pairs_t> |
| swap chosen pair of elements. | |
|
inlineconstexpr |
bit_callable object computing the bitwise AND of its arguments.
Parameters
Return value
|
inlineconstexpr |
bit_callable object computing the bitwise ANDNOT of its arguments.
Parameters
Return value
|
inlineconstexpr |
Computes a bitwise reinterpretation of an object.
Parameters
Template parameters
Return value
The bits of x of type From reinterpreted as being those of a variable of type To is returned.
Every bit in the value representation of the returned To object is equal to the corresponding bit in the object representation of from. The values of padding bits in the returned To object are unspecified.
If there is no value of type To corresponding to the value representation produced, the behavior is undefined. If there are multiple such values, which value is produced is unspecified.
|
inlineconstexpr |
elementwise_callable object computing the smallest integral power of two that is not smaller than x.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object flipping the value the ith bit of each element.
Defined in Header
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing, if x is not zero, the largest integral power of two that is not greater than x.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing a bit mask full of zeroes or ones
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the one complement of the parameter.
Parameters
Return value
|
inlineconstexpr |
bit_callable object computing the bitwise NOTAND of its arguments.
Parameters
Return value
|
inlineconstexpr |
bit_callable object computing the bitwise NOTOR of its arguments.
Parameters
Return value
|
inlineconstexpr |
bit_callable object computing the bitwise OR of its arguments.
Parameters
Return value
|
inlineconstexpr |
bit_callable object Computing the bitwise ORNOT of its arguments.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object reversing the bit order.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object selecting bits from a mask and two entries.
Parameters
Return value The value of the selected bits is returned.
|
inlineconstexpr |
strict_elementwise_callable object setting to 1 the ith bit of each element.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object computing a logical left shift.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object computing a logical right shift.
Defined in Header
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object swapping adjacent groups of n bits.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object swapping pairs.
Parameters
Return value
|
inlineconstexpr |
callable object implementing ternary logic.
Parameters
Return value
The following table is the pattern of a truth table: if op is a ternary bit operator the result column is the desired bit output when calling op pn the x, y and z bit values.
| x | y | z | result |
|---|---|---|---|
| 0 | 0 | 0 | a |
| 0 | 0 | 1 | b |
| 0 | 1 | 0 | c |
| 0 | 1 | 1 | d |
| 1 | 0 | 0 | e |
| 1 | 0 | 1 | f |
| 1 | 1 | 0 | g |
| 1 | 1 | 1 | h |
A programmer as only to supply the result column, i.e. defines values of bits a through h in a single 8-bit value
k = .(a << 7) + (b << 6) + (c << 5) + (d << 4) + (e << 3) + (f << 2) + (g << 1) + h
(the consteval function eve::truth_table can be used to do that operation: see the example)
|
inlineconstexpr |
strict_elementwise_callable object setting to 01 the ith bit of each element.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object Computing elementwise the number of bits needed to store the parameter.
Defined in Header
Parameters
Return value
|
inlineconstexpr |
bit_callable object computing the bitwise XOR of its arguments.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object reversing the byte order.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object that swap adjacent groups of N bytes.
Parameters
Return value
|
inlineconstexpr |
strict_elementwise_callable object swapping chosen pairs of bytes in each vector element.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the number of consecutive bits set in a value starting from left
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the number of consecutive bits unset in a value starting from left
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing the number of consecutive bits set in a value starting from right.
Parameters
Return value
1.The value of the number of consecutive 1 ("one") bits in the value of x, starting from the least significant bit ("right"), with same type as x, is returned.
|
inlineconstexpr |
elementwise_callable object computing the number of consecutive bits unset in a value starting from right.
Parameters
Return value
The value of the number of consecutive 0 ("zero") bits in the value of x, starting from the least significant bit ("right"), with same type as x, is returned.
|
inlineconstexpr |
Computes elementwise the bit pattern in which the only bit set (if it exists) is the first bit set in the input.
Parameters
Return value
|
inlineconstexpr |
Computes elementwise the bit pattern in which the only bit set (if it exists) is the first bit unset in the input.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable computing the most significant half of each lane.
Parameters
Return value
|
inlineconstexpr |
Computes the least significant half of each lane.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable computing the lohi pair of values.
Parameters
Return value
|
inlineconstexpr |
elementwise_callable object computing elementwise the number of bits set in the parameter.
Parameters
Return value
The value of number of bits set in the value x is returned.
|
inlineconstexpr |
Bitwise rotation to the left.
Parameters
Return value
|
inlineconstexpr |
Bitwise rotation to the right.
Parameters
Return value
|
inlineconstexpr |
Computes the arithmetic left/right shift operation according to shift sign.
Parameters
Return value
|
inlineconstexpr |
Computes the arithmetic right/left shift operation according to shift sign.
Parameters
Return value
|
inlineconstexpr |
Computes the arithmetic left shift operation.
Parameters
Return value
|
inlineconstexpr |
Computes the arithmetic right shift operation.
Parameters
Return value
|
inlineconstexpr |
swap chosen pair of elements.
Parameters
Return value
Return x with element i0 and i1 swapped.