Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation with Double Precision Blocked #540

Closed
beomki-yeo opened this issue Apr 14, 2024 · 2 comments
Closed

Compilation with Double Precision Blocked #540

beomki-yeo opened this issue Apr 14, 2024 · 2 comments
Assignees

Comments

@beomki-yeo
Copy link
Contributor

beomki-yeo commented Apr 14, 2024

Maybe we need to make detray configuration always float number?

[beomki@pc-54 traccc_build]$ cmake ../traccc -DTRACCC_CUSTOM_SCALARTYPE=double -DDETRAY_CUSTOM_SCALARTYPE=double
/home/beomki/projects/traccc/traccc/examples/run/cpu/truth_fitting_example.cpp: In function ‘int main(int, char**)’:
/home/beomki/projects/traccc/traccc/examples/run/cpu/truth_fitting_example.cpp:119:44: error: no match for ‘operator=’ (operand types are ‘detray::propagation::config<double>’ and ‘detray::propagation::config<float>’)
  119 |     fit_cfg.propagation = propagation_opts.config;
      |                                            ^~~~~~
In file included from /home/beomki/projects/traccc/traccc/core/include/traccc/fitting/fitting_config.hpp:12,
                 from /home/beomki/projects/traccc/traccc/core/include/traccc/fitting/fitting_algorithm.hpp:14,
                 from /home/beomki/projects/traccc/traccc/examples/run/cpu/truth_fitting_example.cpp:11:
/home/beomki/projects/traccc/traccc_build/_deps/detray-src/core/include/detray/propagator/propagation_config.hpp:18:8: note: candidate: ‘constexpr detray::propagation::config<double>& detray::propagation::config<double>::operator=(const detray::propagation::config<double>&)’
   18 | struct config {
      |        ^~~~~~
/home/beomki/projects/traccc/traccc_build/_deps/detray-src/core/include/detray/propagator/propagation_config.hpp:18:8: note:   no known conversion for argument 1 from ‘detray::propagation::config<float>’ to ‘const detray::propagation::config<double>&’
/home/beomki/projects/traccc/traccc_build/_deps/detray-src/core/include/detray/propagator/propagation_config.hpp:18:8: note: candidate: ‘constexpr detray::propagation::config<double>& detray::propagation::config<double>::operator=(detray::propagation::config<double>&&)’
/home/beomki/projects/traccc/traccc_build/_deps/detray-src/core/include/detray/propagator/propagation_config.hpp:18:8: note:   no known conversion for argument 1 from ‘detray::propagation::config<float>’ to ‘detray::propagation::config<double>&&’
/home/beomki/projects/traccc/traccc/examples/run/cpu/seeding_example.cpp: In function ‘int seq_run(const traccc::opts::track_seeding&, const traccc::opts::track_finding&, const traccc::opts::track_propagation&, const traccc::opts::track_resolution&, const traccc::opts::input_data&, const traccc::opts::detector&, const traccc::opts::performance&)’:
/home/beomki/projects/traccc/traccc/examples/run/cpu/seeding_example.cpp:142:40: error: no match for ‘operator=’ (operand types are ‘detray::propagation::config<double>’ and ‘const detray::propagation::config<float>’)
  142 |     cfg.propagation = propagation_opts.config;
@krasznaa
Copy link
Member

Ouch... I should've tested this... 🤔

Generally, I'll want to get to a stage where all of the templated algorithms / tools / etc. would receive non-templated configuration arguments. To make it a lot easier to handle them in client code.

I guess that should be possible, right? Do we have examples where a "config type" would actually depend on the template parameters of its parent object? (Apart from the scalar type of course.)

But in the meanwhile, I'll try to come up with a temporary solution to this particular issue. 🤔

krasznaa added a commit to krasznaa/traccc that referenced this issue Apr 15, 2024
This is to fix the issue described in acts-project#540. Which was introduced
in acts-project#533.
@beomki-yeo
Copy link
Contributor Author

That should be possible. Just need some time in the detray side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants