Skip to content

Commit

Permalink
fix: removed upscaling power of 2 during component cost metric
Browse files Browse the repository at this point in the history
  • Loading branch information
0xThemis committed Dec 18, 2023
1 parent e8ef2e2 commit b3ca827
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,11 @@ namespace nil {
for (auto it = witness_amount_ptr->begin(); it != witness_amount_ptr->end(); it++) {
const auto witness_amount = *it;
const auto rows_amount = ComponentType::get_rows_amount(witness_amount, args...);
const auto total_amount_rows_power_two = std::pow(2, std::ceil(std::log2(rows_amount)));
//TACEO_TODO clarify this "improved cost metric"
//const auto total_amount_rows_power_two = std::pow(2, std::ceil(std::log2(rows_amount)));
const auto total_amount_of_gates =
ComponentType::get_gate_manifest(witness_amount, args...).get_gates_amount();
values.emplace_back(witness_amount, total_amount_rows_power_two + total_amount_of_gates);
values.emplace_back(witness_amount, rows_amount + total_amount_of_gates);
}
ASSERT(values.size() > 0);
return values;
Expand All @@ -90,4 +91,4 @@ namespace nil {
} // namespace blueprint
} // namespace nil

#endif // CRYPTO3_ASSIGNER_COMPONENT_MANIFEST_UTILITIES_HPP
#endif // CRYPTO3_ASSIGNER_COMPONENT_MANIFEST_UTILITIES_HPP

0 comments on commit b3ca827

Please sign in to comment.