Skip to content

Commit 3af14c5

Browse files
committed
feat: add noop-engine
1 parent e9a845c commit 3af14c5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

std/recursion/sumcheck/arithengine.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,12 @@ func newEmulatedEngine[FR emulated.FieldParams](api frontend.API) (*emuEngine[FR
9595
}
9696
return &emuEngine[FR]{f: f}, nil
9797
}
98+
99+
// noopEngine is a no-operation arithmetic engine. Can be used to access methods of the gates without performing any computation.
100+
type noopEngine struct{}
101+
102+
func (ne *noopEngine) Add(a, b element) element { panic("noop engine: Add called") }
103+
func (ne *noopEngine) Mul(a, b element) element { panic("noop engine: Mul called") }
104+
func (ne *noopEngine) Sub(a, b element) element { panic("noop engine: Sub called") }
105+
func (ne *noopEngine) One() element { panic("noop engine: One called") }
106+
func (ne *noopEngine) Const(i *big.Int) element { panic("noop engine: Const called") }

0 commit comments

Comments
 (0)