Lapack Wrappers: Simplified DGEMM, GEMM for Two Conjugate Args and Improved Pseudo-Inverse

This MR extends the lapack wrapper and drivers:

  • gemm_cc_1

    • Performs \mathbf{C} = \mathbf{A}^\dagger \mathbf{B}^\dagger
    • Note, it might be more efficient to implement as [\mathbf{B} \mathbf{A}]^\dagger, however I would retain the API introduced in this MR and simply test/change the implementation at a later date.
  • lalg_gemm_simple (exposed with lalg_gemm)

    • Wrapper for dgemm operations, operating on all elements of the matrices
    • Supports all permutations of transpose, and alpha and beta parameters
    • Unit-tested
    • Overloaded with the name lalg_gemm
  • X(lalg_pseudo_inverse)

    • Computes the Moore-Penrose pseudo-inverse using BLAS operations. Hopefully more efficient
    • Avoids suboptimal array access
    • Reallocates inv(A), unlike dsvd_inverse. This is fine for square matrices, but one has to know to take the transpose for m /= n
    • Unit tests for X(lalg_pseudo_inverse) and dsvd_inverse

TODOs:

  • Unit-test gemm_cc_1 for real and complex arrays
  • Extend dlalg_pseudo_inverse to zlalg_pseudo_inverse using the macros.

Deferred these points to issue #1132 - [ ] Test performance of lalg_pseudo_inverse vs dsvd_inverse, and retain the faster version - [ ] Replace lalg_zpseudoinverse with lalg_pseudo_inverse or dsvd_inverse, whichever's more optimal

Edited by Alex Buccheri

Merge request reports

Loading