Skip to content

Commit

Permalink
Something
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Nicholas Swatman committed Feb 16, 2023
1 parent ccb7090 commit fd38be0
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions examples/run/cuda/seeding_example_cuda.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
// Project include(s).
#include "traccc/cuda/seeding/seeding_algorithm.hpp"
#include "traccc/cuda/seeding/track_params_estimation.hpp"
#include "traccc/cuda/seeding2/seed_finding.hpp"
#include "traccc/efficiency/seeding_performance_writer.hpp"
#include "traccc/io/read_geometry.hpp"
#include "traccc/io/read_spacepoints.hpp"
Expand All @@ -33,7 +34,7 @@
namespace po = boost::program_options;

int seq_run(const traccc::seeding_input_config& i_cfg,
const traccc::common_options& common_opts, bool run_cpu) {
const traccc::common_options& common_opts, bool run_cpu, bool use_alt_seeding) {

// Read the surface transforms
auto surface_transforms = traccc::io::read_geometry(i_cfg.detector_file);
Expand All @@ -55,6 +56,7 @@ int seq_run(const traccc::seeding_input_config& i_cfg,
vecmem::cuda::copy copy;

traccc::cuda::seeding_algorithm sa_cuda{mr};
traccc::cuda::seed_finding2 sa_cuda_alt{mr};
traccc::cuda::track_params_estimation tp_cuda{mr};

// performance writer
Expand Down Expand Up @@ -123,7 +125,11 @@ int seq_run(const traccc::seeding_input_config& i_cfg,
{
traccc::performance::timer t("Seeding (cuda)", elapsedTimes);
// Reconstruct the spacepoints into seeds.
seeds_cuda_buffer = sa_cuda(spacepoints_cuda_buffer);
if (use_alt_seeding) {
seeds_cuda_buffer = sa_cuda_alt(spacepoints_cuda_buffer);
} else {
seeds_cuda_buffer = sa_cuda(spacepoints_cuda_buffer);
}
} // stop measuring seeding cuda timer

// CPU
Expand Down Expand Up @@ -237,6 +243,8 @@ int main(int argc, char* argv[]) {
desc.add_options()("run_cpu", po::value<bool>()->default_value(false),
"run cpu tracking as well");

desc.add_options()("alt", po::value<bool>()->default_value(false), "use alternative seeding algorithm");

po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);

Expand All @@ -252,5 +260,5 @@ int main(int argc, char* argv[]) {
<< " " << common_opts.input_directory << " " << common_opts.events
<< std::endl;

return seq_run(seeding_input_cfg, common_opts, run_cpu);
return seq_run(seeding_input_cfg, common_opts, run_cpu, vm["alt"].as<bool>());
}

0 comments on commit fd38be0

Please sign in to comment.