4#ifndef TETL_BIT_ROTL_HPP
5#define TETL_BIT_ROTL_HPP
7#include <etl/_concepts/builtin_unsigned_integer.hpp>
8#include <etl/_limits/numeric_limits.hpp>
16template <
etl::builtin_unsigned_integer UInt>
17constexpr auto rotl(UInt t,
int s)
noexcept -> UInt
19 auto const c =
static_cast<
unsigned>(s);
24 return static_cast<UInt>((t << (c % d)) | (t >> (d - (c % d))));
constexpr auto rotl(UInt t, int s) noexcept -> UInt
Computes the result of bitwise left-rotating the value of x by s positions. This operation is also kn...
Definition rotl.hpp:17
Definition adjacent_find.hpp:9
Definition numeric_limits.hpp:18