mirror of
https://github.com/thunderbrewhq/squall.git
synced 2025-12-12 02:22:30 +00:00
40 lines
1 KiB
C++
40 lines
1 KiB
C++
#ifndef STORM_BIG_OPS_HPP
|
|
#define STORM_BIG_OPS_HPP
|
|
|
|
#include "storm/big/BigBuffer.hpp"
|
|
#include "storm/big/BigStack.hpp"
|
|
#include <cstdint>
|
|
|
|
void Add(BigBuffer& a, const BigBuffer& b, uint32_t c);
|
|
|
|
void Add(BigBuffer& a, const BigBuffer& b, const BigBuffer& c);
|
|
|
|
int32_t Compare(const BigBuffer& a, const BigBuffer& b);
|
|
|
|
uint32_t ExtractLowPart(uint64_t& value);
|
|
|
|
uint32_t ExtractLowPartSx(uint64_t& value);
|
|
|
|
void FromBinary(BigBuffer& buffer, const void* value, uint32_t bytes);
|
|
|
|
void FromUnsigned(BigBuffer& buffer, uint32_t value);
|
|
|
|
uint32_t HighBitPos(const BigBuffer& buffer);
|
|
|
|
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);
|
|
|
|
void Mul(BigBuffer& a, const BigBuffer& b, const BigBuffer& c, BigStack& stack);
|
|
|
|
void SetOne(BigBuffer& buffer);
|
|
|
|
void SetZero(BigBuffer& buffer);
|
|
|
|
void Sub(BigBuffer& a, const BigBuffer& b, const BigBuffer& c);
|
|
|
|
void ToBinary(TSGrowableArray<uint8_t>& output, const BigBuffer& buffer);
|
|
|
|
#endif
|