MCPcopy Create free account
hub / github.com/PolyhedraZK/ExpanderCompilerCollection / GetFieldFromOrder

Function GetFieldFromOrder

ecgo/field/field.go:20–31  ·  view source on GitHub ↗
(x *big.Int)

Source from the content-addressed store, hash-verified

18}
19
20func GetFieldFromOrder(x *big.Int) Field {
21 if x.Cmp(bn254.ScalarField) == 0 {
22 return &bn254.Field{}
23 }
24 if x.Cmp(m31.ScalarField) == 0 {
25 return &m31.Field{}
26 }
27 if x.Cmp(gf2.ScalarField) == 0 {
28 return &gf2.Field{}
29 }
30 panic(fmt.Sprintf("unknown field %v", x))
31}
32
33func GetFieldId(f Field) uint64 {
34 if f.Field().Cmp(m31.ScalarField) == 0 {

Callers 5

SerializeMethod · 0.92
DeserializeRootCircuitFunction · 0.92
DetectFieldIdFromFileFunction · 0.92
NewRootFunction · 0.92
SerializeMethod · 0.92

Calls 1

CmpMethod · 0.80

Tested by

no test coverage detected