Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions std/recursion/sumcheck/arithengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,3 +95,12 @@ func newEmulatedEngine[FR emulated.FieldParams](api frontend.API) (*emuEngine[FR
}
return &emuEngine[FR]{f: f}, nil
}

// noopEngine is a no-operation arithmetic engine. Can be used to access methods of the gates without performing any computation.
type noopEngine struct{}

func (ne *noopEngine) Add(a, b element) element { panic("noop engine: Add called") }
func (ne *noopEngine) Mul(a, b element) element { panic("noop engine: Mul called") }
func (ne *noopEngine) Sub(a, b element) element { panic("noop engine: Sub called") }
func (ne *noopEngine) One() element { panic("noop engine: One called") }
func (ne *noopEngine) Const(i *big.Int) element { panic("noop engine: Const called") }
Loading