squall/storm/big/Ops.hpp

37 lines
917 B
C++
Raw Normal View History

2023-01-23 22:10:24 -06:00
#ifndef STORM_BIG_OPS_HPP
#define STORM_BIG_OPS_HPP
#include "storm/big/BigBuffer.hpp"
2023-01-30 00:10:52 -06:00
#include "storm/big/BigStack.hpp"
2023-01-23 22:10:24 -06:00
#include <cstdint>
2023-01-31 22:17:51 -06:00
void Add(BigBuffer& a, const BigBuffer& b, uint32_t c);
2023-01-29 22:12:59 -06:00
void Add(BigBuffer& a, const BigBuffer& b, const BigBuffer& c);
2023-01-31 22:34:05 -06:00
int32_t Compare(const BigBuffer& a, const BigBuffer& b);
2023-01-23 22:10:24 -06:00
uint32_t ExtractLowPart(uint64_t& value);
uint32_t ExtractLowPartSx(uint64_t& value);
2023-01-29 20:37:09 -06:00
void FromBinary(BigBuffer& buffer, const void* value, uint32_t bytes);
void FromUnsigned(BigBuffer& buffer, uint32_t value);
2023-02-01 21:08:15 -06:00
uint32_t HighBitPos(const BigBuffer& a);
2023-01-23 22:10:24 -06:00
uint64_t MakeLarge(uint32_t low, uint32_t high);
2023-01-29 22:59:28 -06:00
void Mul(BigBuffer& a, const BigBuffer& b, uint64_t c);
2023-01-30 00:10:52 -06:00
void Mul(BigBuffer& a, const BigBuffer& b, const BigBuffer& c, BigStack& stack);
2023-01-31 22:07:33 -06:00
void SetOne(BigBuffer& buffer);
2023-01-31 12:17:51 -06:00
void SetZero(BigBuffer& buffer);
void ToBinary(TSGrowableArray<uint8_t>& output, const BigBuffer& buffer);
2023-01-23 22:10:24 -06:00
#endif