Closed carterbox closed 4 years ago
Hello @carterbox! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:
src/tike/operators/numpy/usfft.py
:Line 139:81: E501 line too long (83 > 80 characters) Line 162:21: E131 continuation line unaligned for hanging indent Line 163:21: E131 continuation line unaligned for hanging indent
Purpose
Reduce the memory footprint of USFFT operations. Closes #66
Approach
Padding and unpadding operations in the usfft were using "wrap" mode that were associated with the scatter gather operations. These padding operations were equivalent to using modular arithmetic to wrap the indices of these operations. By using special indexing instead of padding and unpadding we remove additional memory usage that would grow with the desired accuracy of the transform.
Benchmark with the Laminography adjoint operator test:
n=224, ntheta=224, tilt=np.pi/3
where "used memory" is the volume of all arrays allocated during the test and "aquired memory" is the maximum size of the memory pool at any time.It seems that the change in memory footprint due to changing the accuracy of the transform is now negligible.
Pre-Merge Checklists
Submitter
yapf
to format python code.Reviewer