Skip to content

Commit

Permalink
feat(bench): PoC of integration with zkalc
Browse files Browse the repository at this point in the history
  • Loading branch information
mratsim committed Jul 11, 2024
1 parent 1b4d969 commit 94b5d04
Show file tree
Hide file tree
Showing 12 changed files with 474 additions and 19 deletions.
3 changes: 2 additions & 1 deletion benchmarks/bench_elliptic_parallel_template.nim
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ proc createBenchMsmContext*(EC: typedesc, inputSizes: openArray[int]): BenchMsmC
const bits = EC.getScalarField().bits()
type ECaff = affine(EC)

result.numInputs = maxNumInputs
result.points = newSeq[ECaff](maxNumInputs)
result.coefs = newSeq[BigInt[bits]](maxNumInputs)

Expand All @@ -81,7 +82,7 @@ proc createBenchMsmContext*(EC: typedesc, inputSizes: openArray[int]): BenchMsmC
var tmp = threadRng.random_unsafe(EC)
tmp.clearCofactor()
points[i].affine(tmp)
coefs[i] = rng.random_unsafe(BigInt[bits])
coefs[i] = threadRng.random_unsafe(BigInt[bits])

let chunks = balancedChunksPrioNumber(0, maxNumInputs, result.tp.numThreads)

Expand Down
Loading

0 comments on commit 94b5d04

Please sign in to comment.