[itops] split convmat in allocation and a convmat_inplace builder fun… #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Dear Jason,
I have been struggling with
imtime_ops.convmat
for systems having a large number of orbitals. The main challenge has been that of getting control of allocations, so that the large convolution matrix is only allocated once.This pull requests splits the current
imtime_ops.convmat
in two functions, retaining the API of theconvmat
and adding aconvmat_inplace
method that builds the matrix in-place using a passed matrix_view. This way it is possible for the library user to take control over the allocation.I am currently using it on 1.1.x (and this is a pull request to the 1.1.x. branch), together with Triqs 1.3.x (that depends on cppdlr 1.1.x).
Cheers, Hugo