Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-26 08:22:13

0001 /** TRACCC library, part of the ACTS project (R&D line)
0002  *
0003  * (c) 2024-2025 CERN for the benefit of the ACTS project
0004  *
0005  * Mozilla Public License Version 2.0
0006  */
0007 
0008 // Local include(s).
0009 #include "traccc/options/clusterization.hpp"
0010 
0011 #include "traccc/clusterization/clusterization_algorithm.hpp"
0012 #include "traccc/examples/utils/printable.hpp"
0013 
0014 namespace traccc::opts {
0015 
0016 clusterization::clusterization() : interface("Clusterization Options") {
0017   m_desc.add_options()(
0018       "threads-per-partition",
0019       boost::program_options::value(&m_config.threads_per_partition)
0020           ->default_value(m_config.threads_per_partition),
0021       "The number of threads per partition");
0022   m_desc.add_options()(
0023       "max-cells-per-thread",
0024       boost::program_options::value(&m_config.max_cells_per_thread)
0025           ->default_value(m_config.max_cells_per_thread),
0026       "The maximum number of cells per thread");
0027   m_desc.add_options()(
0028       "target-cells-per-thread",
0029       boost::program_options::value(&m_config.target_cells_per_thread)
0030           ->default_value(m_config.target_cells_per_thread),
0031       "The target number of cells per thread");
0032   m_desc.add_options()(
0033       "backup-size-multiplier",
0034       boost::program_options::value(&m_config.backup_size_multiplier)
0035           ->default_value(m_config.backup_size_multiplier),
0036       "The size multiplier of the backup scratch space");
0037 }
0038 
0039 clusterization::operator clustering_config() const {
0040   return m_config;
0041 }
0042 
0043 clusterization::operator host::clusterization_algorithm::config_type() const {
0044   return {};
0045 }
0046 
0047 std::unique_ptr<configuration_printable> clusterization::as_printable() const {
0048   auto cat = std::make_unique<configuration_category>(m_description);
0049 
0050   cat->add_child(std::make_unique<configuration_kv_pair>(
0051       "Threads per partition", std::to_string(m_config.threads_per_partition)));
0052   cat->add_child(std::make_unique<configuration_kv_pair>(
0053       "Target cells per thread",
0054       std::to_string(m_config.target_cells_per_thread)));
0055   cat->add_child(std::make_unique<configuration_kv_pair>(
0056       "Max cells per thread", std::to_string(m_config.max_cells_per_thread)));
0057   cat->add_child(std::make_unique<configuration_kv_pair>(
0058       "Scratch space multiplier",
0059       std::to_string(m_config.backup_size_multiplier)));
0060 
0061   return cat;
0062 }
0063 }  // namespace traccc::opts