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/accelerator.hpp"
0010 
0011 #include "traccc/examples/utils/printable.hpp"
0012 
0013 // System include(s).
0014 #include <format>
0015 
0016 namespace traccc::opts {
0017 
0018 accelerator::accelerator() : interface("Accelerator Options") {
0019   m_desc.add_options()("compare-with-cpu",
0020                        boost::program_options::bool_switch(&compare_with_cpu),
0021                        "Compare accelerator output with that of the CPU");
0022   m_desc.add_options()(
0023       "use-gpu-texture-memory",
0024       boost::program_options::bool_switch(&use_gpu_texture_memory),
0025       "Use GPU texture memory on the accelerator");
0026 }
0027 
0028 std::unique_ptr<configuration_printable> accelerator::as_printable() const {
0029   auto cat = std::make_unique<configuration_category>(m_description);
0030 
0031   cat->add_child(std::make_unique<configuration_kv_pair>(
0032       "Compare with CPU output", std::format("{}", compare_with_cpu)));
0033   cat->add_child(std::make_unique<configuration_kv_pair>(
0034       "Use GPU texture memory", std::format("{}", use_gpu_texture_memory)));
0035 
0036   return cat;
0037 }
0038 
0039 }  // namespace traccc::opts