Skip to content

Implementations of C++20 concepts and requires#120

Merged
AAAlvesJr merged 26 commits into
MultithreadCorner:develop-hydra4from
dbrundu:devel-concepts
Jul 16, 2026
Merged

Implementations of C++20 concepts and requires#120
AAAlvesJr merged 26 commits into
MultithreadCorner:develop-hydra4from
dbrundu:devel-concepts

Conversation

@dbrundu

@dbrundu dbrundu commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

We implemented C++20 concepts in Hydra and introduced requires statements, in order to replace many verbose constraints on template arguments to take benefit of SFINAE rule, by using enable_if<>.

Tested compilation:

  • Host backends (CPP / OMP / TBB): full build of the examples + test suite, all unit tests pass (Catch2). GCC 15.2.1, --std=c++20.

  • CUDA backend: compiles cleanly under nvcc CUDA 12.6.2 (nvcc V12.6.77, host compiler GCC 11.4.0), --std=c++20, -arch=sm_70. The full example set + test suite were compile-verified.

@AAAlvesJr

Copy link
Copy Markdown
Contributor

Thank you @dbrundu , really great job done here.

From my side, I think the PR got to a mostly ready to merge point. No additional code is needed, just some operations from my side. So, in the next days I will review the changes, test the examples and try to find some GPU available around to run the cuda based executables. As you know well, if past is a good predictor of the future, and usually it is, in Hydra, once code is valid enough to compile, runtime errors are unlikely to occur. But even like that, we still need to check things are running as they should.

My next steps will be:

1 - test code directly on your fork/branch
2- fix whatever is necessary
3- merge in develop-hydra4
4 - organize a new release

Please, stay tunned. And once again, Thanks!

@dbrundu

dbrundu commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @AAAlvesJr for the support. For documentation I add here the tests I did:

  • Host build clean (cpp/omp/tbb, examples + tests).
  • Examples run on host backends: 90/90 clean, 0 runtime errors.
  • Unit tests (Catch2) with 1376 assertions * 3 host backends passed.
  • nvcc build with CUDA 12.6 clean.

Please note that this covers the non-Minuit2 examples because I didn't run with ROOT/Minuit2 available.

AAAlvesJr and others added 5 commits July 15, 2026 14:57
correct small bug on StatsPHSP
Sync fork from develop-hydra4 branch of head repository
…cc error on incomplete RngFormula<T> when the trait is probed with a non-functor
@AAAlvesJr
AAAlvesJr merged commit 0c3e25d into MultithreadCorner:develop-hydra4 Jul 16, 2026
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

Successfully merging this pull request may close these issues.

2 participants