PaStiX Handbook  6.2.1
lowrank.c
Go to the documentation of this file.
1 /**
2  *
3  * @file lowrank.c
4  *
5  * PaStiX low-rank common structures to store pointer to the multiple functions.
6  *
7  * @copyright 2016-2021 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
8  * Univ. Bordeaux. All rights reserved.
9  *
10  * @version 6.0.3
11  * @author Gregoire Pichon
12  * @author Mathieu Faverge
13  * @author Esragul Korkmaz
14  * @date 2019-12-19
15  * @precisions normal z -> c d s
16  *
17  **/
18 #include "common.h"
19 #include "pastix_zlrcores.h"
20 #include "pastix_clrcores.h"
21 #include "pastix_dlrcores.h"
22 #include "pastix_slrcores.h"
23 
24 double pastix_lr_minratio = 1.0;
25 pastix_int_t pastix_lr_ortho = 0;
26 
28  "SVD",
29  "PQRCP",
30  "RQRCP",
31  "TQRCP",
32  "RQRRT",
33 };
34 
36  "Singular Values Decomposition",
37  "Partial QR with Column Pivoting",
38  "Randomized QR with Column Pivoting",
39  "Truncated QR with Column Pivoting",
40  "Randomized QR with QR rotation",
41 };
42 
44 {
50 };
51 
53 {
59 };
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRCP.
Definition: core_crqrcp.c:411
pastix_lr_minratio
double pastix_lr_minratio
Define the minimal ratio for which we accept to compress a matrix into a low-rank form or not.
Definition: lowrank.c:24
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.
Definition: core_crqrcp.c:474
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using TQRCP.
Definition: core_stqrcp.c:454
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.
Definition: core_zpqrcp.c:504
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.
Definition: core_dpqrcp.c:504
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.
Definition: core_cpqrcp.c:504
core_dge2lr_svd
pastix_fixdbl_t core_dge2lr_svd(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 SVD.
Definition: core_dgelrops_svd.c:116
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using TQRCP.
Definition: core_ctqrcp.c:454
compmeth_shnames
const char * compmeth_shnames[PastixCompressMethodNbr]
List of short names for the compression kernels.
Definition: lowrank.c:27
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.
Definition: core_stqrcp.c:518
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRRT.
Definition: core_drqrrt.c:373
pastix_lr_ortho
pastix_int_t pastix_lr_ortho
Define the orthogonalization method.
Definition: lowrank.c:25
core_sge2lr_svd
pastix_fixdbl_t core_sge2lr_svd(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 SVD.
Definition: core_sgelrops_svd.c:116
ge2lrMethods
const fct_ge2lr_t ge2lrMethods[PastixCompressMethodNbr][4]
Array of pointers to the multiple arithmetic and algorithmic variants of ge2lr.
Definition: lowrank.c:43
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRRT.
Definition: core_srqrrt.c:373
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using PQRCP.
Definition: core_spqrcp.c:440
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRCP.
Definition: core_srqrcp.c:411
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using TQRCP.
Definition: core_ztqrcp.c:454
compmeth_lgnames
const char * compmeth_lgnames[PastixCompressMethodNbr]
List of long names for the compression kernels.
Definition: lowrank.c:35
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRCP.
Definition: core_drqrcp.c:411
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRRT.
Definition: core_crqrrt.c:373
fct_ge2lr_t
pastix_fixdbl_t(* fct_ge2lr_t)(int, pastix_fixdbl_t, pastix_int_t, pastix_int_t, pastix_int_t, const void *, pastix_int_t, pastix_lrblock_t *)
Type of the functions to compress a dense block into a low-rank form.
Definition: pastix_lowrank.h:122
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using PQRCP.
Definition: core_dpqrcp.c:440
pastix_zlrcores.h
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.
Definition: core_dtqrcp.c:518
PastixCompressMethodNbr
@ PastixCompressMethodNbr
Definition: api.h:377
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRCP.
Definition: core_zrqrcp.c:411
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.
Definition: core_ztqrcp.c:518
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using PQRCP.
Definition: core_zpqrcp.c:440
pastix_slrcores.h
core_cge2lr_svd
pastix_fixdbl_t core_cge2lr_svd(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 SVD.
Definition: core_cgelrops_svd.c:116
core_srradd_svd
pastix_fixdbl_t core_srradd_svd(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.
Definition: core_sgelrops_svd.c:333
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.
Definition: core_srqrcp.c:474
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.
Definition: core_drqrcp.c:474
core_zge2lr_svd
pastix_fixdbl_t core_zge2lr_svd(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 SVD.
Definition: core_zgelrops_svd.c:116
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.
Definition: core_spqrcp.c:504
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.
Definition: core_ctqrcp.c:518
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using TQRCP.
Definition: core_dtqrcp.c:454
rraddMethods
const fct_rradd_t rraddMethods[PastixCompressMethodNbr][4]
Array of pointers to the multiple arithmetic and algorithmic variants of rradd.
Definition: lowrank.c:52
core_crradd_svd
pastix_fixdbl_t core_crradd_svd(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.
Definition: core_cgelrops_svd.c:333
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.
Definition: core_zrqrcp.c:474
pastix_dlrcores.h
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using PQRCP.
Definition: core_cpqrcp.c:440
core_drradd_svd
pastix_fixdbl_t core_drradd_svd(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.
Definition: core_dgelrops_svd.c:333
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 *Avoid, pastix_int_t lda, pastix_lrblock_t *Alr)
Convert a full rank matrix in a low rank matrix, using RQRRT.
Definition: core_zrqrrt.c:373
pastix_clrcores.h
core_zrradd_svd
pastix_fixdbl_t core_zrradd_svd(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.
Definition: core_zgelrops_svd.c:333
fct_rradd_t
pastix_fixdbl_t(* fct_rradd_t)(const pastix_lr_t *, pastix_trans_t, const void *, pastix_int_t, pastix_int_t, const pastix_lrblock_t *, pastix_int_t, pastix_int_t, pastix_lrblock_t *, pastix_int_t, pastix_int_t)
Type of the functions to add two low-rank blocks together.
Definition: pastix_lowrank.h:133