Documentation
¶
Index ¶
- Constants
- func CostOfCompress(deg0, deg1, deg2 int) int
- func CostOfMultiply(aDeg0, aDeg1, bDeg0, bDeg1 int) int
- func FromInterface(input interface{}) big.Int
- func NextPowerOfTwo(x int, is4 bool) int
- func ShowProfiling(varSourceInfo []SourceInfo, varCost []int)
- func SortIntSeq(s []int, cmp func(int, int) bool)
- type Hashable
- type InputBuf
- type IntSeq
- type Map
- type OutputBuf
- type SourceInfo
Constants ¶
View Source
const CostOfAddGate = 3
View Source
const CostOfCstGate = 3
View Source
const CostOfInput = 1000
View Source
const CostOfMulGate = 10
View Source
const CostOfVariable = 100
Variables ¶
This section is empty.
Functions ¶
func CostOfCompress ¶
func CostOfMultiply ¶
func FromInterface ¶
FromInterface converts an interface to a big.Int element
input must be primitive (uintXX, intXX, []byte, string) or implement BigInt(res *big.Int) (which is the case for gnark-crypto field elements)
if the input is a string, it calls (big.Int).SetString(input, 0). In particular: The number prefix determines the actual base: A prefix of ”0b” or ”0B” selects base 2, ”0”, ”0o” or ”0O” selects base 8, and ”0x” or ”0X” selects base 16. Otherwise, the selected base is 10 and no prefix is accepted.
panics if the input is invalid
func NextPowerOfTwo ¶
pad to 2^n gates (and 4^n for first layer) 4^n exists for historical reasons, not used now
func ShowProfiling ¶
func ShowProfiling(varSourceInfo []SourceInfo, varCost []int)
Types ¶
type InputBuf ¶
type InputBuf struct {
// contains filtered or unexported fields
}
func NewInputBuf ¶
func (*InputBuf) ReadBigInt ¶
func (*InputBuf) ReadUint32 ¶
func (*InputBuf) ReadUint64 ¶
type Map ¶
type Map map[uint64][]mapEntry
func (Map) FilterKeys ¶
filter keys in the map using the given function
type OutputBuf ¶
type OutputBuf struct {
// contains filtered or unexported fields
}
func (*OutputBuf) AppendBigInt ¶
func (*OutputBuf) AppendUint32 ¶
func (*OutputBuf) AppendUint64 ¶
type SourceInfo ¶
Click to show internal directories.
Click to hide internal directories.