◆ bit_shl
Callable object computing the logical left shift operation. Required header: Members Functions
template< value T, integral_real_value U > auto operator()( T x, U n ) const noexcept requires bit_compatible< T, U >;
Parameters
Return value Computes the elementwise logical left shift of the first parameter by the second one. the call The types must share the same cardinal or be scalar and if \(N\) is the size in bits of the element type of auto operator[]( conditional_expression auto cond ) const noexcept;
Higher-order function generating a masked version of eve::bit_shl Parameters
Return value A Callable object so that the expression Supported decoratorsno decorators are supported ExampleSee it live on Compiler Explorer #include <eve/function/bit_shl.hpp>
#include <eve/literals.hpp>
#include <eve/wide.hpp>
#include <iostream>
int main()
{
using w_t = eve::wide<std::uint32_t, eve::fixed<4>>;
w_t pi = {3, 2, 3, 4}, qi = {4, 1, 2, 0};
std::uint32_t z = 5;
std::cout << "---- simd" << '\n'
<< " <- qi = " << qi << '\n'
<< " <- z = " << z << '\n'
std::uint32_t a = 1;
std::uint32_t n = 4;
std::cout << "---- scalar" << '\n'
<< " <- a = " << a << '\n'
<< " <- n = " << n << '\n'
return 0;
}
detail::callable_object< tag::shl_ > const bit_shl Callable object computing the logical left shift operation. Definition: bit_shl.hpp:81 |