Skip to content

Commit

Permalink
fix params in bts shallowcopy
Browse files Browse the repository at this point in the history
  • Loading branch information
lehugueni committed Nov 21, 2024
1 parent 68b999e commit 76d8965
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions circuits/ckks/bootstrapping/evaluator.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,12 @@ func (eval Evaluator) ShallowCopy() *Evaluator {
heEvaluator := eval.Evaluator.ShallowCopy()

paramsN1 := eval.ResidualParameters
paramsN2 := eval.BootstrappingParameters

var DomainSwitcher ckks.DomainSwitcher
if paramsN1.RingType() == ring.ConjugateInvariant {
var err error
if DomainSwitcher, err = ckks.NewDomainSwitcher(eval.Parameters.BootstrappingParameters, eval.EvkCmplxToReal, eval.EvkRealToCmplx); err != nil {
if DomainSwitcher, err = ckks.NewDomainSwitcher(paramsN2, eval.EvkCmplxToReal, eval.EvkRealToCmplx); err != nil {
panic(fmt.Errorf("cannot NewBootstrapper: ckks.NewDomainSwitcher: %w", err))
}
}
Expand All @@ -153,8 +154,8 @@ func (eval Evaluator) ShallowCopy() *Evaluator {
xPow2N2: eval.xPow2N2,
xPow2InvN2: eval.xPow2InvN2,
DomainSwitcher: DomainSwitcher,
DFTEvaluator: dft.NewEvaluator(paramsN1, heEvaluator),
Mod1Evaluator: mod1.NewEvaluator(heEvaluator, polynomial.NewEvaluator(paramsN1, heEvaluator), eval.Mod1Parameters),
DFTEvaluator: dft.NewEvaluator(paramsN2, heEvaluator),
Mod1Evaluator: mod1.NewEvaluator(heEvaluator, polynomial.NewEvaluator(paramsN2, heEvaluator), eval.Mod1Parameters),
SkDebug: eval.SkDebug,
}
}
Expand Down

0 comments on commit 76d8965

Please sign in to comment.