diff options
Diffstat (limited to 'src/lib/utils/donna128.h')
-rw-r--r-- | src/lib/utils/donna128.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/utils/donna128.h b/src/lib/utils/donna128.h index 2cfeb455f..037d9bdfe 100644 --- a/src/lib/utils/donna128.h +++ b/src/lib/utils/donna128.h @@ -111,6 +111,17 @@ inline u64bit combine_lower(const donna128 a, size_t s1, return z.lo(); } +inline u64bit carry_shift(const uint128_t a, size_t shift) + { + return static_cast<u64bit>(a >> shift); + } + +inline u64bit combine_lower(const uint128_t a, size_t s1, + const uint128_t b, size_t s2) + { + return static_cast<u64bit>((a >> s1) | (b << s2)); + } + } #endif |