Skip to content

Commit

Permalink
implement benchmarks derivation
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreyMlashkin committed Nov 26, 2024
1 parent 00540ee commit fed52ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions crypto3.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
enableDebug ? false,
runTests ? false,
sanitize ? false,
bench ? false,
}:
let
inherit (lib) optional;
Expand All @@ -34,6 +35,7 @@ in stdenv.mkDerivation {
(if runTests then "-DBUILD_CRYPTO3_TESTS=TRUE" else "-DBUILD_CRYPTO3_TESTS=False")
(if enableDebug then "-DCMAKE_BUILD_TYPE=Debug" else "-DCMAKE_BUILD_TYPE=Release")
(if sanitize then "-DSANITIZE=ON" else "-DSANITIZE=OFF")
(if bench then "-DBUILD_CRYPTO3_BENCH_TESTS=ON" else "-DBUILD_CRYPTO3_BENCH_TESTS=OFF")
"-G Ninja"
];

Expand Down
2 changes: 1 addition & 1 deletion crypto3/benchmarks/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ set(BENCHMARK_NAMES

"multiprecision/modular_adaptor_fixed"

"zk/lpc"
#"zk/lpc"
"zk/pedersen"
)

Expand Down
2 changes: 1 addition & 1 deletion crypto3/benchmarks/algebra/curves.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ void benchmark_curve_operations(std::string const& curve_name)
return A *= B;
});

if constexpr (has_template_g2_type<curve_type>::value) {
if constexpr (has_type_g2_type<curve_type>::value) {
using g2_type = typename curve_type::template g2_type<>;

using g2_field = typename g2_type::field_type;
Expand Down

0 comments on commit fed52ea

Please sign in to comment.