E.V.E
v2023.02.15
Loading...
Searching...
No Matches
◆
rotr
auto eve::rotr =
functor
<rotr_t>
inline
constexpr
Header file
#include <eve/module/core.hpp>
Callable Signatures
namespace
eve
{
// Regular overloads
constexpr
auto
rotr
(
unsigned_value
auto
x,
integral_value
auto
n)
noexcept
;
// 2
// Lanes masking
constexpr
auto
rotr
[
conditional_expr
auto
c](
unsigned_value
auto
x,
integral_value
auto
n)
noexcept
;
// 3
constexpr
auto
rotr
[
logical_value
auto
m](
unsigned_value
auto
x,
integral_value
auto
n)
noexcept
;
// 3
}
eve::conditional_expr
Specifies that a type is a Conditional Expression.
Definition
conditional.hpp:28
eve::integral_value
The concept integral_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:51
eve::logical_value
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition
value.hpp:134
eve::unsigned_value
The concept unsigned_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition
value.hpp:84
eve::rotr
constexpr auto rotr
Bitwise rotation to the right.
Definition
rotr.hpp:83
eve
EVE Main Namespace.
Definition
abi.hpp:19
Parameters
x
:
argument
to be rotated.
n
:
shift
.
c
:
Conditional expression
masking the operation.
m
:
Logical value
masking the operation.
Return value
Bitwise rotation of each lane of
x
by
n
bits to the right. The types must share the same cardinal or be scalar and if
N
is the size in bits of the element type of
T
, all
elements
of n must belong to the interval:
[0, N[
or the result is undefined.
The operation is performed conditionnaly
Example
// revision 0
#include <eve/module/core.hpp>
#include <iostream>
int
main()
{
eve::wide
wu0{0u, 1u, 2u, 3u, 4u, 5u, 6u, 7u};
eve::wide
wu1{7u, 6u, 5u, 4u, 3u, 2u, 1u, 0u};
std::cout <<
"<- wu0 = "
<< wu0 <<
"\n"
;
std::cout <<
"<- wu1 = "
<< wu1 <<
"\n"
;
std::cout <<
"-> rotr(wu0, wu1) = "
<<
eve::rotr
(wu0, wu1) <<
"\n"
;
std::cout <<
"-> rotr[ignore_last(2)](wu0, wu1) = "
<<
eve::rotr
[
eve::ignore_last
(2)](wu0, wu1) <<
"\n"
;
std::cout <<
"-> rotr[wu0 != 0](wu0, wu1) = "
<<
eve::rotr
[wu0 != 0](wu0, wu1) <<
"\n"
;
}
eve::ignore_last
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition
conditional.hpp:353
eve::wide
Wrapper for SIMD registers.
Definition
wide.hpp:94
eve