cutde icon indicating copy to clipboard operation
cutde copied to clipboard

Return ACA outputs in a packed format.

Open tbenthompson opened this issue 3 years ago • 0 comments

See here: https://tbenthompson.com/book/tdes/hmatrix.html#faster-approximate-blocks-on-gpus-with-cutde

approx_max_rank = np.max([U.shape[1] for U, _ in approx_blocks_gpu])
UVflattened = [np.concatenate((V.flatten(), U.flatten())) for U, V in approx_blocks_gpu]
approx_block_starts = np.empty(len(UVflattened) + 1, dtype=np.int64)
approx_block_starts[0] = 0
approx_block_starts[1:] = np.cumsum([arr.size for arr in UVflattened])
approx_packed_blocks = np.concatenate(UVflattened)

tbenthompson avatar Jun 14 '21 19:06 tbenthompson