4#ifndef TETL_BIT_ROTR_HPP
5#define TETL_BIT_ROTR_HPP
7#include <etl/_concepts/builtin_unsigned_integer.hpp>
8#include <etl/_limits/numeric_limits.hpp>
16template <
etl::builtin_unsigned_integer UInt>
17constexpr auto rotr(UInt t,
int s)
noexcept -> UInt
19 auto const cnt =
static_cast<
unsigned>(s);
21 if ((cnt % digits) == 0) {
24 return static_cast<UInt>((t >> (cnt % digits)) | (t << (digits - (cnt % digits))));
constexpr auto rotr(UInt t, int s) noexcept -> UInt
Computes the result of bitwise right-rotating the value of x by s positions. This operation is also k...
Definition rotr.hpp:17
Definition adjacent_find.hpp:9
Definition numeric_limits.hpp:18