Exemplo n.º 1
0
command::log_opt_t log_store_entry_statistics<circuit>( const circuit& circ )
{
  return command::log_opt_t({
      {"gates", static_cast<int>( circ.num_gates() )},
      {"lines", static_cast<int>( circ.lines() )}
    });
}
Exemplo n.º 2
0
  void print_statistics( std::ostream& os, const circuit& circ, double runtime, const print_statistics_settings& settings )
  {
    std::string runtime_string;

    if ( runtime != -1 )
    {
      runtime_string = boost::str( boost::format( settings.runtime_template ) % runtime );
    }

    boost::format fmt( settings.main_template );
    fmt.exceptions( boost::io::all_error_bits ^ ( boost::io::too_many_args_bit | boost::io::too_few_args_bit ) );

    os << fmt
      % runtime_string
      % circ.lines()
      % circ.num_gates()
      % costs( circ, costs_by_gate_func( ncv_quantum_costs() ) )
      % costs( circ, costs_by_gate_func( t_depth_costs() ) )
      % costs( circ, costs_by_gate_func( t_costs() ) )
      % costs( circ, costs_by_gate_func( h_costs() ) )
      % costs( circ, costs_by_gate_func( transistor_costs() ) )
      % costs( circ, costs_by_gate_func( sk2013_quantum_costs() ) );
  }
Exemplo n.º 3
0
std::string store_entry_to_string<circuit>( const circuit& circ )
{
  return ( boost::format( "%d lines, %d gates" ) % circ.lines() % circ.num_gates() ).str();
}