Skip to content

Commit

Permalink
Fix valid bound in CKKS and Fix error in BackendTest
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeho committed Mar 12, 2024
1 parent 38ae03f commit d2bf94f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/main/scala/fhetest/Generate/LibConfigGenerator.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,12 @@ case class ValidLibConfigGenerator(encType: ENC_TYPE)
case Scheme.BFV | Scheme.BGV =>
Some(Random.between(1, randomEncParams.plainMod + 1))
case Scheme.CKKS =>
Some(Random.between(1, math.pow(2, randomFirstModSize) + 1))
Some(
Random.between(
1,
math.pow(2, randomFirstModSize % randomEncParams.mulDepth) + 1,
),
)
}
val randomRotateBoundOpt: Option[Int] =
Some(Random.between(0, 20 + 1))
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/BackendTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ abstract class BackendTest(
workspaceDir => {
given DirName = workspaceDir
Print(ast, symTable, enc_type, backend, wordSizeOpt, encParamsOpt)
Execute(backend)
Execute(backend, None)
},
)

Expand Down

0 comments on commit d2bf94f

Please sign in to comment.