| 68 |
62 |
| 69 // http://stackoverflow.com/a/18204188/3629665 |
63 // http://stackoverflow.com/a/18204188/3629665 |
| 70 template<typename T> |
64 template<typename T> |
| 71 constexpr int rotl10(T x) |
65 constexpr int rotl10(T x) |
| 72 { |
66 { |
| 73 return (((x) << 10) | (((x) >> 22) & 0x000000ff)); |
67 return (x << 10) | ((x >> 22) & 0x000000ff); |
| 74 } |
68 } |
| 75 |
69 |
| 76 template<typename T> |
70 template<typename T> |
| 77 constexpr int rotl20(T x) |
71 constexpr int rotl20(T x) |
| 78 { |
72 { |
| 79 return (((x) << 20) | (((x) >> 12) & 0x000000ff)); |
73 return (x << 20) | ((x >> 12) & 0x000000ff); |
| 80 } |
74 } |
| 81 |
75 |
| 82 // |
76 // |
| 83 // Get the amount of elements in something. |
77 // Get the amount of elements in something. |
| 84 // |
78 // |