Skip to content

Conversation

@JBludau
Copy link
Contributor

@JBludau JBludau commented Oct 22, 2025

The docstrings state that ParameterPack requires the elements to be copyable to the device.
When makeParameterPack is used it implicitly requires default constructability and assignability of the elements. This would not be necessary if ParameterPack would provide a ctor that allows to go through the element's copyctor.

This PR adds a ctor to ParameterPack that uses the element's copy ctor.
I am not sure if we want the ctor to be part of the public interface or make it private and have a new convenience function (like makeParameterPack) that is friend of the class and can construct it.

This came up in CabanaPD for multiforce models where we would like to have a model that redirects to a multitude of models that are stored in the ParameterPack. Nevertheless, the models are not default constructible. An alternative to this PR would be to make the models in CabanaPD default constructible and assignable.

@JBludau JBludau force-pushed the make_parameter_pack_not_rely_on_default_constructibility branch from 8f5683a to 25c323f Compare October 22, 2025 16:08
@JBludau JBludau force-pushed the make_parameter_pack_not_rely_on_default_constructibility branch from 9dd1384 to 7c3c044 Compare November 3, 2025 20:55
@JBludau
Copy link
Contributor Author

JBludau commented Nov 5, 2025

@streeve could you trigger the CI on this?

@JBludau
Copy link
Contributor Author

JBludau commented Nov 5, 2025

hmm ok. I guess the doxygen build canceled the other ones

@JBludau
Copy link
Contributor Author

JBludau commented Nov 12, 2025

I tried on a CUDA machine and test pass there as well

Copy link
Member

@streeve streeve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@streeve streeve merged commit edb0c7c into ECP-copa:master Nov 13, 2025
34 checks passed
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