PaStiX Handbook  6.3.2
Low-rank Rank-Revealing QR kernels

PastixComplex32 main template to convert a full rank matrix to low-rank

typedef int(* core_crrqr_cp_t) (float tol, pastix_int_t maxrank, int refine, pastix_int_t nb, pastix_int_t m, pastix_int_t n, pastix_complex32_t *A, pastix_int_t lda, pastix_int_t *jpvt, pastix_complex32_t *tau, pastix_complex32_t *work, pastix_int_t lwork, float *rwork)
 TODO.
 
typedef int(* core_crrqr_rt_t) (float tol, pastix_int_t maxrank, pastix_int_t nb, pastix_int_t m, pastix_int_t n, pastix_complex32_t *A, pastix_int_t lda, pastix_complex32_t *tau, pastix_complex32_t *B, pastix_int_t ldb, pastix_complex32_t *tau_b, pastix_complex32_t *work, pastix_int_t lwork, float normA)
 TODO.
 

PastixFloat main template to convert a full rank matrix to low-rank

typedef int(* core_srrqr_cp_t) (float tol, pastix_int_t maxrank, int refine, pastix_int_t nb, pastix_int_t m, pastix_int_t n, float *A, pastix_int_t lda, pastix_int_t *jpvt, float *tau, float *work, pastix_int_t lwork, float *rwork)
 TODO.
 
typedef int(* core_srrqr_rt_t) (float tol, pastix_int_t maxrank, pastix_int_t nb, pastix_int_t m, pastix_int_t n, float *A, pastix_int_t lda, float *tau, float *B, pastix_int_t ldb, float *tau_b, float *work, pastix_int_t lwork, float normA)
 TODO.
 

PastixDouble main template to convert a full rank matrix to low-rank

typedef int(* core_drrqr_cp_t) (double tol, pastix_int_t maxrank, int refine, pastix_int_t nb, pastix_int_t m, pastix_int_t n, double *A, pastix_int_t lda, pastix_int_t *jpvt, double *tau, double *work, pastix_int_t lwork, double *rwork)
 TODO.
 
typedef int(* core_drrqr_rt_t) (double tol, pastix_int_t maxrank, pastix_int_t nb, pastix_int_t m, pastix_int_t n, double *A, pastix_int_t lda, double *tau, double *B, pastix_int_t ldb, double *tau_b, double *work, pastix_int_t lwork, double normA)
 TODO.
 

PastixComplex64 main template to convert a full rank matrix to low-rank

typedef int(* core_zrrqr_cp_t) (double tol, pastix_int_t maxrank, int refine, pastix_int_t nb, pastix_int_t m, pastix_int_t n, pastix_complex64_t *A, pastix_int_t lda, pastix_int_t *jpvt, pastix_complex64_t *tau, pastix_complex64_t *work, pastix_int_t lwork, double *rwork)
 TODO.
 
typedef int(* core_zrrqr_rt_t) (double tol, pastix_int_t maxrank, pastix_int_t nb, pastix_int_t m, pastix_int_t n, pastix_complex64_t *A, pastix_int_t lda, pastix_complex64_t *tau, pastix_complex64_t *B, pastix_int_t ldb, pastix_complex64_t *tau_b, pastix_complex64_t *work, pastix_int_t lwork, double normA)
 TODO.
 

PastixComplex32 Rank Revealing QR kernels for low-rank

pastix_fixdbl_t core_cge2lr_pqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using PQRCP. More...
 
pastix_fixdbl_t core_crradd_pqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_cge2lr_rqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRCP. More...
 
pastix_fixdbl_t core_crradd_rqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_cge2lr_tqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using TQRCP. More...
 
pastix_fixdbl_t core_crradd_tqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_cge2lr_rqrrt (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRRT. More...
 
pastix_fixdbl_t core_cge2lr_qrcp (core_crrqr_cp_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_cge2lr_qrrt (core_crrqr_rt_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_crradd_qr (core_crrqr_cp_t rrqrfct, const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition. More...
 

PastixFloat Rank Revealing QR kernels for low-rank

pastix_fixdbl_t core_sge2lr_pqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using PQRCP. More...
 
pastix_fixdbl_t core_srradd_pqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_sge2lr_rqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRCP. More...
 
pastix_fixdbl_t core_srradd_rqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_sge2lr_tqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using TQRCP. More...
 
pastix_fixdbl_t core_srradd_tqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_sge2lr_rqrrt (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRRT. More...
 
pastix_fixdbl_t core_sge2lr_qrcp (core_srrqr_cp_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_sge2lr_qrrt (core_srrqr_rt_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_srradd_qr (core_srrqr_cp_t rrqrfct, const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition. More...
 

PastixDouble Rank Revealing QR kernels for low-rank

pastix_fixdbl_t core_dge2lr_pqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using PQRCP. More...
 
pastix_fixdbl_t core_drradd_pqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_dge2lr_rqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRCP. More...
 
pastix_fixdbl_t core_drradd_rqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_dge2lr_tqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using TQRCP. More...
 
pastix_fixdbl_t core_drradd_tqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_dge2lr_rqrrt (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRRT. More...
 
pastix_fixdbl_t core_dge2lr_qrcp (core_drrqr_cp_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_dge2lr_qrrt (core_drrqr_rt_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_drradd_qr (core_drrqr_cp_t rrqrfct, const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition. More...
 

PastixComplex64 Rank Revealing QR kernels for low-rank

pastix_fixdbl_t core_zge2lr_pqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using PQRCP. More...
 
pastix_fixdbl_t core_zrradd_pqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_zge2lr_rqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRCP. More...
 
pastix_fixdbl_t core_zrradd_rqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_zge2lr_tqrcp (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using TQRCP. More...
 
pastix_fixdbl_t core_zrradd_tqrcp (const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T. More...
 
pastix_fixdbl_t core_zge2lr_rqrrt (int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Convert a full rank matrix in a low rank matrix, using RQRRT. More...
 
pastix_fixdbl_t core_zge2lr_qrcp (core_zrrqr_cp_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_zge2lr_qrrt (core_zrrqr_rt_t rrqrfct, int use_reltol, pastix_fixdbl_t tol, pastix_int_t rklimit, pastix_int_t m, pastix_int_t n, const void *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
 Template to convert a full rank matrix into a low rank matrix through QR decompositions. More...
 
pastix_fixdbl_t core_zrradd_qr (core_zrrqr_cp_t rrqrfct, const pastix_lr_t *lowrank, pastix_trans_t transA1, const void *alphaptr, pastix_int_t M1, pastix_int_t N1, const pastix_lrblock_t *A, pastix_int_t M2, pastix_int_t N2, pastix_lrblock_t *B, pastix_int_t offx, pastix_int_t offy)
 Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition. More...
 

Detailed Description

These are the rank-revealing QR implementations to generate the low-rank representations of a full rank matrix.

Function Documentation

◆ core_cge2lr_pqrcp()

pastix_fixdbl_t core_cge2lr_pqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using PQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 455 of file core_cpqrcp.c.

References core_cge2lr_qrcp(), and core_cpqrcp().

◆ core_crradd_pqrcp()

pastix_fixdbl_t core_crradd_pqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute PQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 523 of file core_cpqrcp.c.

References core_cpqrcp(), and core_crradd_qr().

◆ core_cge2lr_rqrcp()

pastix_fixdbl_t core_cge2lr_rqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 424 of file core_crqrcp.c.

References core_cge2lr_qrcp(), and core_crqrcp().

◆ core_crradd_rqrcp()

pastix_fixdbl_t core_crradd_rqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute RQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 491 of file core_crqrcp.c.

References core_crqrcp(), and core_crradd_qr().

◆ core_cge2lr_tqrcp()

pastix_fixdbl_t core_cge2lr_tqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using TQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 467 of file core_ctqrcp.c.

References core_cge2lr_qrcp(), and core_ctqrcp().

◆ core_crradd_tqrcp()

pastix_fixdbl_t core_crradd_tqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute TQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 535 of file core_ctqrcp.c.

References core_crradd_qr(), and core_ctqrcp().

◆ core_cge2lr_rqrrt()

pastix_fixdbl_t core_cge2lr_rqrrt ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRRT.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 389 of file core_crqrrt.c.

References core_cge2lr_qrrt(), and core_crqrrt().

◆ core_cge2lr_qrcp()

pastix_fixdbl_t core_cge2lr_qrcp ( core_crrqr_cp_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when permutation method is used. Only difference from core_cge2lr_qrrt is the V calculation part, That is: Instead of applying inverse rotation on V, here inverse permutation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 778 of file core_cgelrops.c.

References core_clralloc(), core_clrdbg_check_orthogonality(), core_get_rklimit, pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_cge2lr_pqrcp(), core_cge2lr_rqrcp(), and core_cge2lr_tqrcp().

◆ core_cge2lr_qrrt()

pastix_fixdbl_t core_cge2lr_qrrt ( core_crrqr_rt_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when rotational method is used. Only difference from core_cge2lr_qr is the V calculation part, That is: Instead of applying inverse permutation on V, here inverse rotation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 977 of file core_cgelrops.c.

References core_clralloc(), core_clrdbg_check_orthogonality(), core_get_rklimit, pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_cge2lr_rqrrt().

◆ core_crradd_qr()

pastix_fixdbl_t core_crradd_qr ( core_crrqr_cp_t  rrqrfct,
const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition.

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute Rank Revealing QR decomposition of (I u2^T u1) * (v2 v1)^T (0 I ) Any QR rank revealing kernel can be used for the recompression of the V part.

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization of the sum of the two low-rank matrices.
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

In relative tolerance, we can choose two solutions: 1) The first one, more conservative, is to compress relatively to the norm of the final matrix \( \alpha A + B \). In this kernel, we exploit the fact that the V part contains all the information while the U part is orthonormal, and compute it as follow:

float norm = LAPACKE_clange_work( LAPACK_COL_MAJOR, 'f', rank, N, v1v2, ldv, NULL ); tol = tol * norm;

2) The second solution, less conservative, will allow to reduce the rank more efficiently. Since A and B have been compressed relatively to their respective norms, there is no reason to compress the sum relatively to its own norm, but it is more reasonable to compress it relatively to the norm of A and B. For example, A-B would be full with the first criterion, and rank null with the second. Note that here, we can only have an estimation that once again reduces the conservation of the criterion.

\[ || \alpha A + B || <= |\alpha| ||A|| + ||B|| <= |\alpha| ||U_aV_a|| + ||U_bV_b|| \]

Definition at line 1218 of file core_cgelrops.c.

References core_clrconcatenate_u(), core_clrconcatenate_v(), core_clrcpy(), core_clrdbg_check_orthogonality(), core_get_rklimit, pastix_int_t, PastixNoTrans, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lr_s::tolerance, and pastix_lrblock_s::u.

Referenced by core_crradd_pqrcp(), core_crradd_rqrcp(), and core_crradd_tqrcp().

◆ core_sge2lr_pqrcp()

pastix_fixdbl_t core_sge2lr_pqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using PQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 455 of file core_spqrcp.c.

References core_sge2lr_qrcp(), and core_spqrcp().

◆ core_srradd_pqrcp()

pastix_fixdbl_t core_srradd_pqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute PQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 523 of file core_spqrcp.c.

References core_spqrcp(), and core_srradd_qr().

◆ core_sge2lr_rqrcp()

pastix_fixdbl_t core_sge2lr_rqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 424 of file core_srqrcp.c.

References core_sge2lr_qrcp(), and core_srqrcp().

◆ core_srradd_rqrcp()

pastix_fixdbl_t core_srradd_rqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute RQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 491 of file core_srqrcp.c.

References core_srqrcp(), and core_srradd_qr().

◆ core_sge2lr_tqrcp()

pastix_fixdbl_t core_sge2lr_tqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using TQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 467 of file core_stqrcp.c.

References core_sge2lr_qrcp(), and core_stqrcp().

◆ core_srradd_tqrcp()

pastix_fixdbl_t core_srradd_tqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute TQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 535 of file core_stqrcp.c.

References core_srradd_qr(), and core_stqrcp().

◆ core_sge2lr_rqrrt()

pastix_fixdbl_t core_sge2lr_rqrrt ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRRT.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 389 of file core_srqrrt.c.

References core_sge2lr_qrrt(), and core_srqrrt().

◆ core_sge2lr_qrcp()

pastix_fixdbl_t core_sge2lr_qrcp ( core_srrqr_cp_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when permutation method is used. Only difference from core_sge2lr_qrrt is the V calculation part, That is: Instead of applying inverse rotation on V, here inverse permutation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 778 of file core_sgelrops.c.

References core_get_rklimit, core_slralloc(), core_slrdbg_check_orthogonality(), pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_sge2lr_pqrcp(), core_sge2lr_rqrcp(), and core_sge2lr_tqrcp().

◆ core_sge2lr_qrrt()

pastix_fixdbl_t core_sge2lr_qrrt ( core_srrqr_rt_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when rotational method is used. Only difference from core_sge2lr_qr is the V calculation part, That is: Instead of applying inverse permutation on V, here inverse rotation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 977 of file core_sgelrops.c.

References core_get_rklimit, core_slralloc(), core_slrdbg_check_orthogonality(), pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_sge2lr_rqrrt().

◆ core_srradd_qr()

pastix_fixdbl_t core_srradd_qr ( core_srrqr_cp_t  rrqrfct,
const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition.

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute Rank Revealing QR decomposition of (I u2^T u1) * (v2 v1)^T (0 I ) Any QR rank revealing kernel can be used for the recompression of the V part.

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization of the sum of the two low-rank matrices.
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

In relative tolerance, we can choose two solutions: 1) The first one, more conservative, is to compress relatively to the norm of the final matrix \( \alpha A + B \). In this kernel, we exploit the fact that the V part contains all the information while the U part is orthonormal, and compute it as follow:

float norm = LAPACKE_slange_work( LAPACK_COL_MAJOR, 'f', rank, N, v1v2, ldv, NULL ); tol = tol * norm;

2) The second solution, less conservative, will allow to reduce the rank more efficiently. Since A and B have been compressed relatively to their respective norms, there is no reason to compress the sum relatively to its own norm, but it is more reasonable to compress it relatively to the norm of A and B. For example, A-B would be full with the first criterion, and rank null with the second. Note that here, we can only have an estimation that once again reduces the conservation of the criterion.

\[ || \alpha A + B || <= |\alpha| ||A|| + ||B|| <= |\alpha| ||U_aV_a|| + ||U_bV_b|| \]

Definition at line 1218 of file core_sgelrops.c.

References core_get_rklimit, core_slrconcatenate_u(), core_slrconcatenate_v(), core_slrcpy(), core_slrdbg_check_orthogonality(), pastix_int_t, PastixNoTrans, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lr_s::tolerance, and pastix_lrblock_s::u.

Referenced by core_srradd_pqrcp(), core_srradd_rqrcp(), and core_srradd_tqrcp().

◆ core_dge2lr_pqrcp()

pastix_fixdbl_t core_dge2lr_pqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using PQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 455 of file core_dpqrcp.c.

References core_dge2lr_qrcp(), and core_dpqrcp().

◆ core_drradd_pqrcp()

pastix_fixdbl_t core_drradd_pqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute PQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 523 of file core_dpqrcp.c.

References core_dpqrcp(), and core_drradd_qr().

◆ core_dge2lr_rqrcp()

pastix_fixdbl_t core_dge2lr_rqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 424 of file core_drqrcp.c.

References core_dge2lr_qrcp(), and core_drqrcp().

◆ core_drradd_rqrcp()

pastix_fixdbl_t core_drradd_rqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute RQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 491 of file core_drqrcp.c.

References core_drqrcp(), and core_drradd_qr().

◆ core_dge2lr_tqrcp()

pastix_fixdbl_t core_dge2lr_tqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using TQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 467 of file core_dtqrcp.c.

References core_dge2lr_qrcp(), and core_dtqrcp().

◆ core_drradd_tqrcp()

pastix_fixdbl_t core_drradd_tqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute TQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 535 of file core_dtqrcp.c.

References core_drradd_qr(), and core_dtqrcp().

◆ core_dge2lr_rqrrt()

pastix_fixdbl_t core_dge2lr_rqrrt ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRRT.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 389 of file core_drqrrt.c.

References core_dge2lr_qrrt(), and core_drqrrt().

◆ core_dge2lr_qrcp()

pastix_fixdbl_t core_dge2lr_qrcp ( core_drrqr_cp_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when permutation method is used. Only difference from core_dge2lr_qrrt is the V calculation part, That is: Instead of applying inverse rotation on V, here inverse permutation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 778 of file core_dgelrops.c.

References core_dlralloc(), core_dlrdbg_check_orthogonality(), core_get_rklimit, pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_dge2lr_pqrcp(), core_dge2lr_rqrcp(), and core_dge2lr_tqrcp().

◆ core_dge2lr_qrrt()

pastix_fixdbl_t core_dge2lr_qrrt ( core_drrqr_rt_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when rotational method is used. Only difference from core_dge2lr_qr is the V calculation part, That is: Instead of applying inverse permutation on V, here inverse rotation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 977 of file core_dgelrops.c.

References core_dlralloc(), core_dlrdbg_check_orthogonality(), core_get_rklimit, pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_dge2lr_rqrrt().

◆ core_drradd_qr()

pastix_fixdbl_t core_drradd_qr ( core_drrqr_cp_t  rrqrfct,
const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition.

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute Rank Revealing QR decomposition of (I u2^T u1) * (v2 v1)^T (0 I ) Any QR rank revealing kernel can be used for the recompression of the V part.

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization of the sum of the two low-rank matrices.
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

In relative tolerance, we can choose two solutions: 1) The first one, more conservative, is to compress relatively to the norm of the final matrix \( \alpha A + B \). In this kernel, we exploit the fact that the V part contains all the information while the U part is orthonormal, and compute it as follow:

double norm = LAPACKE_dlange_work( LAPACK_COL_MAJOR, 'f', rank, N, v1v2, ldv, NULL ); tol = tol * norm;

2) The second solution, less conservative, will allow to reduce the rank more efficiently. Since A and B have been compressed relatively to their respective norms, there is no reason to compress the sum relatively to its own norm, but it is more reasonable to compress it relatively to the norm of A and B. For example, A-B would be full with the first criterion, and rank null with the second. Note that here, we can only have an estimation that once again reduces the conservation of the criterion.

\[ || \alpha A + B || <= |\alpha| ||A|| + ||B|| <= |\alpha| ||U_aV_a|| + ||U_bV_b|| \]

Definition at line 1218 of file core_dgelrops.c.

References core_dlrconcatenate_u(), core_dlrconcatenate_v(), core_dlrcpy(), core_dlrdbg_check_orthogonality(), core_get_rklimit, pastix_int_t, PastixNoTrans, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lr_s::tolerance, and pastix_lrblock_s::u.

Referenced by core_drradd_pqrcp(), core_drradd_rqrcp(), and core_drradd_tqrcp().

◆ core_zge2lr_pqrcp()

pastix_fixdbl_t core_zge2lr_pqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using PQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 455 of file core_zpqrcp.c.

References core_zge2lr_qrcp(), and core_zpqrcp().

◆ core_zrradd_pqrcp()

pastix_fixdbl_t core_zrradd_pqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute PQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 523 of file core_zpqrcp.c.

References core_zpqrcp(), and core_zrradd_qr().

◆ core_zge2lr_rqrcp()

pastix_fixdbl_t core_zge2lr_rqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 424 of file core_zrqrcp.c.

References core_zge2lr_qrcp(), and core_zrqrcp().

◆ core_zrradd_rqrcp()

pastix_fixdbl_t core_zrradd_rqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute RQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 491 of file core_zrqrcp.c.

References core_zrqrcp(), and core_zrradd_qr().

◆ core_zge2lr_tqrcp()

pastix_fixdbl_t core_zge2lr_tqrcp ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using TQRCP.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 467 of file core_ztqrcp.c.

References core_zge2lr_qrcp(), and core_ztqrcp().

◆ core_zrradd_tqrcp()

pastix_fixdbl_t core_zrradd_tqrcp ( const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T.

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute TQRCP decomposition of (I u2^T u1) * (v2 v1)^T (0 I )

Parameters
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

Definition at line 535 of file core_ztqrcp.c.

References core_zrradd_qr(), and core_ztqrcp().

◆ core_zge2lr_rqrrt()

pastix_fixdbl_t core_zge2lr_rqrrt ( int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  A,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Convert a full rank matrix in a low rank matrix, using RQRRT.

Parameters
[in]use_reltolDefines if the kernel should use relative tolerance (tol *||A||), or absolute tolerance (tol).
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Definition at line 389 of file core_zrqrrt.c.

References core_zge2lr_qrrt(), and core_zrqrrt().

◆ core_zge2lr_qrcp()

pastix_fixdbl_t core_zge2lr_qrcp ( core_zrrqr_cp_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when permutation method is used. Only difference from core_zge2lr_qrrt is the V calculation part, That is: Instead of applying inverse rotation on V, here inverse permutation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 778 of file core_zgelrops.c.

References core_get_rklimit, core_zlralloc(), core_zlrdbg_check_orthogonality(), pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_zge2lr_pqrcp(), core_zge2lr_rqrcp(), and core_zge2lr_tqrcp().

◆ core_zge2lr_qrrt()

pastix_fixdbl_t core_zge2lr_qrrt ( core_zrrqr_rt_t  rrqrfct,
int  use_reltol,
pastix_fixdbl_t  tol,
pastix_int_t  rklimit,
pastix_int_t  m,
pastix_int_t  n,
const void *  Avoid,
pastix_int_t  lda,
pastix_lrblock_t Alr 
)

Template to convert a full rank matrix into a low rank matrix through QR decompositions.

This version is only used when rotational method is used. Only difference from core_zge2lr_qr is the V calculation part, That is: Instead of applying inverse permutation on V, here inverse rotation is applied

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization and create the low-rank form of A.
[in]use_reltolTODO
[in]tolThe tolerance used as a criterion to eliminate information from the full rank matrix
[in]rklimitThe maximum rank to store the matrix in low-rank format. If -1, set to min(m, n) / PASTIX_LR_MINRATIO.
[in]mNumber of rows of the matrix A, and of the low rank matrix Alr.
[in]nNumber of columns of the matrix A, and of the low rank matrix Alr.
[in]AvoidThe matrix of dimension lda-by-n that needs to be compressed
[in]ldaThe leading dimension of the matrix A. lda >= max(1, m)
[out]AlrThe low rank matrix structure that will store the low rank representation of A
Returns
TODO

Backup A into Acpy to try to compress

It was not interesting to compress, so we restore the dense version in Alr

We compute U and V

Definition at line 977 of file core_zgelrops.c.

References core_get_rklimit, core_zlralloc(), core_zlrdbg_check_orthogonality(), pastix_int_t, PastixLeft, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lrblock_s::u, and pastix_lrblock_s::v.

Referenced by core_zge2lr_rqrrt().

◆ core_zrradd_qr()

pastix_fixdbl_t core_zrradd_qr ( core_zrrqr_cp_t  rrqrfct,
const pastix_lr_t lowrank,
pastix_trans_t  transA1,
const void *  alphaptr,
pastix_int_t  M1,
pastix_int_t  N1,
const pastix_lrblock_t A,
pastix_int_t  M2,
pastix_int_t  N2,
pastix_lrblock_t B,
pastix_int_t  offx,
pastix_int_t  offy 
)

Template to perform the addition of two low-rank structures with compression kernel based on QR decomposition.

Add two LR structures A=(-u1) v1^T and B=u2 v2^T into u2 v2^T

u2v2^T - u1v1^T = (u2 u1) (v2 v1)^T Orthogonalize (u2 u1) = (u2, u1 - u2(u2^T u1)) * (I u2^T u1) (0 I ) Compute Rank Revealing QR decomposition of (I u2^T u1) * (v2 v1)^T (0 I ) Any QR rank revealing kernel can be used for the recompression of the V part.

Parameters
[in]rrqrfctQR decomposition function used to compute the rank revealing factorization of the sum of the two low-rank matrices.
[in]lowrankThe structure with low-rank parameters.
[in]transA1
  • PastixNoTrans: No transpose, op( A ) = A;
  • PastixTrans: Transpose, op( A ) = A';
[in]alphaptralpha * A is add to B
[in]M1The number of rows of the matrix A.
[in]N1The number of columns of the matrix A.
[in]AThe low-rank representation of the matrix A.
[in]M2The number of rows of the matrix B.
[in]N2The number of columns of the matrix B.
[in]BThe low-rank representation of the matrix B.
[in]offxThe horizontal offset of A with respect to B.
[in]offyThe vertical offset of A with respect to B.
Returns
The new rank of u2 v2^T or -1 if ranks are too large for recompression

In relative tolerance, we can choose two solutions: 1) The first one, more conservative, is to compress relatively to the norm of the final matrix \( \alpha A + B \). In this kernel, we exploit the fact that the V part contains all the information while the U part is orthonormal, and compute it as follow:

double norm = LAPACKE_zlange_work( LAPACK_COL_MAJOR, 'f', rank, N, v1v2, ldv, NULL ); tol = tol * norm;

2) The second solution, less conservative, will allow to reduce the rank more efficiently. Since A and B have been compressed relatively to their respective norms, there is no reason to compress the sum relatively to its own norm, but it is more reasonable to compress it relatively to the norm of A and B. For example, A-B would be full with the first criterion, and rank null with the second. Note that here, we can only have an estimation that once again reduces the conservation of the criterion.

\[ || \alpha A + B || <= |\alpha| ||A|| + ||B|| <= |\alpha| ||U_aV_a|| + ||U_bV_b|| \]

Definition at line 1218 of file core_zgelrops.c.

References core_get_rklimit, core_zlrconcatenate_u(), core_zlrconcatenate_v(), core_zlrcpy(), core_zlrdbg_check_orthogonality(), pastix_int_t, PastixNoTrans, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, pastix_lr_s::tolerance, and pastix_lrblock_s::u.

Referenced by core_zrradd_pqrcp(), core_zrradd_rqrcp(), and core_zrradd_tqrcp().