cMHN 1.2
C++ library for learning MHNs with pRC
Loading...
Searching...
No Matches
bit_rotate_left.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: BSD-2-Clause
2
3#ifndef pRC_CORE_BASIC_FUNCTIONS_BIT_ROTATE_LEFT_H
4#define pRC_CORE_BASIC_FUNCTIONS_BIT_ROTATE_LEFT_H
5
8
9namespace pRC
10{
11 template<IsUnsignedIntegral TA, IsUnsignedIntegral TB>
12 static inline constexpr auto bitRotateLeft(TA const value, TB count)
13 {
15
16 if(count == 0)
17 {
18 return value;
19 }
20
21 return (value << count) |
23 }
24}
25#endif // pRC_CORE_BASIC_FUNCTIONS_BIT_ROTATE_LEFT_H
int value
Definition gmock-actions_test.cc:1714
int * count
Definition gmock_stress_test.cc:90
Definition cholesky.hpp:10
static constexpr auto bitRotateLeft(TA const value, TB count)
Definition bit_rotate_left.hpp:12
Definition limits.hpp:13