Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
constraint_profiling.cpp
Go to the documentation of this file.
1 
14 #include <libff/common/profiling.hpp>
16 
17 namespace libsnark
18 {
19 
21 std::vector<constraint_profiling_entry> constraint_profiling_table;
22 
24 {
25  size_t accounted = 0;
26  libff::print_indent();
27  printf("Constraint profiling:\n");
29  if (ent.indent == 0) {
30  accounted += ent.count;
31  }
32 
33  libff::print_indent();
34  for (size_t i = 0; i < ent.indent; ++i) {
35  printf(" ");
36  }
37  printf(
38  "* Number of constraints in [%s]: %zu\n",
39  ent.annotation.c_str(),
40  ent.count);
41  }
42 
45 
46  return accounted;
47 }
48 
49 } // namespace libsnark
libsnark
Definition: accumulation_vector.hpp:18
libsnark::constraint_profiling_entry
Definition: constraint_profiling.hpp:25
constraint_profiling.hpp
libsnark::PRINT_CONSTRAINT_PROFILING
size_t PRINT_CONSTRAINT_PROFILING()
Definition: constraint_profiling.cpp:23
libsnark::constraint_profiling_table
std::vector< constraint_profiling_entry > constraint_profiling_table
Definition: constraint_profiling.cpp:21
libsnark::constraint_profiling_indent
size_t constraint_profiling_indent
Definition: constraint_profiling.cpp:20