You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
v0:= []int64{1, 1, 1, 1}
pt:=bgv.NewPlaintext(param, param.MaxLevel())
// v0_packed appearing for the first timev0_packed:=make([]int64, param.MaxSlots())
fori:=rangev0_packed {
v0_packed[i] =int64(v0[i%len(v0)])
}
encoder.Encode(v0_packed, pt)
pt1:=ptct2, err0:=evaluator.AddNew(ct, pt1)
iferr0!=nil {
panic(err0)
}
pt2:=bgv.NewPlaintext(param, param.MaxLevel())
// v0_packed appearing for the second time// GO would complain "no new variables on left side of :="v0_packed:=make([]int64, param.MaxSlots())
fori:=rangev0_packed {
v0_packed[i] =int64(v0[i%len(v0)])
}
encoder.Encode(v0_packed, pt2)
pt3:=pt2ct3, err1:=evaluator.AddNew(ct2, pt3)
iferr1!=nil {
panic(err1)
}
returnct3
Should be fixed by v0_pt_packed and v0_pt2_packed.
Or should be be fixed by CSE? but it seems like the following code could not be CSE, especially different plaintext could have different scale (ref to #1169)
For the following mlir
It will be translated to
Should be fixed by
v0_pt_packed
andv0_pt2_packed
.Or should be be fixed by CSE? but it seems like the following code could not be CSE, especially different plaintext could have different scale (ref to #1169)
The text was updated successfully, but these errors were encountered: