mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 10:32:29 +00:00
feat(big): add InsertLowPart
This commit is contained in:
parent
5d875631a6
commit
2b8cc51ad8
3 changed files with 32 additions and 0 deletions
|
|
@ -95,6 +95,10 @@ uint32_t HighBitPos(const BigBuffer& buffer) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
void InsertLowPart(uint64_t& value, uint32_t low) {
|
||||
value = (value << 32) | low;
|
||||
}
|
||||
|
||||
uint64_t MakeLarge(uint32_t low, uint32_t high) {
|
||||
return low + (static_cast<uint64_t>(high) << 32);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,6 +21,8 @@ void FromUnsigned(BigBuffer& buffer, uint32_t value);
|
|||
|
||||
uint32_t HighBitPos(const BigBuffer& a);
|
||||
|
||||
void InsertLowPart(uint64_t& value, uint32_t low);
|
||||
|
||||
uint64_t MakeLarge(uint32_t low, uint32_t high);
|
||||
|
||||
void Mul(BigBuffer& a, const BigBuffer& b, uint64_t c);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue