E.V.E
v2023.02.15
 
Loading...
Searching...
No Matches

◆ rotr

auto eve::rotr = functor<rotr_t>
inlineconstexpr

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
}
Specifies that a type is a Conditional Expression.
Definition conditional.hpp:28
The concept integral_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:51
The concept logical_value<T> is satisfied if and only if T satisfies eve::value and the element type ...
Definition value.hpp:132
The concept unsigned_value<T> is satisfied if and only if T satisfies eve::value and the element type...
Definition value.hpp:84
constexpr auto rotr
Bitwise rotation to the right.
Definition rotr.hpp:83
EVE Main Namespace.
Definition abi.hpp:18

Parameters

Return value

  1. 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.
    1. 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";
}
Conditional expression ignoring the k last lanes from a eve::simd_value.
Definition conditional.hpp:332
Wrapper for SIMD registers.
Definition wide.hpp:70