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

Avoid constructing amplitudes from passed arrays multiple times #40

Open
Schoyen opened this issue Mar 13, 2020 · 0 comments
Open

Avoid constructing amplitudes from passed arrays multiple times #40

Schoyen opened this issue Mar 13, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Schoyen
Copy link
Collaborator

Schoyen commented Mar 13, 2020

This is related to #39, and seen in relation with #35. A solution is to construct an internal _update_hamiltonian-method which takes in the current time and an amplitudes object (either an AmplitudeContainer or an OACCVector) instead of an array. We can then let update_hamiltonian be the exposed function taking in an array, constructing the amplitudes from the template and passing this in to _update_hamiltonian. This lets __call__ and other functions call _update_hamiltonian directly thus limiting the number of times the amplitudes needs to be constructed from an array.

@Schoyen Schoyen added the enhancement New feature or request label Mar 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant