barretenberg
Loading...
Searching...
No Matches
rotate.hpp
1#pragma once
2#include <cstddef>
3#include <cstdint>
4
5namespace numeric {
6
7constexpr inline uint64_t rotate64(const uint64_t value, const uint64_t rotation)
8{
9 return rotation != 0U ? (value >> rotation) + (value << (64 - rotation)) : value;
10}
11
12constexpr inline uint32_t rotate32(const uint32_t value, const uint32_t rotation)
13{
14 return rotation != 0U ? (value >> rotation) + (value << (32 - rotation)) : value;
15}
16} // namespace numeric
Definition: field2_declarations.hpp:6