19 #include "common/common.h"
65 if ( lrA->
rk != -1 ) {
68 assert( lrA->
u != NULL );
69 assert( lrA->
v == NULL );
71 kernel_trace_start_lvl2( PastixKernelLvl2_LR_init_compress );
74 kernel_trace_stop_lvl2_rank( flops, lrA->
rk );
76 assert( A != lrA->
u );
128 assert( cblk->
cblktype & CBLK_LAYOUT_2D );
129 assert( cblk->
cblktype & CBLK_COMPRESSED );
131 if ( ncols < lowrank->compress_min_width ) {
135 for (; blok<lblok; blok++)
138 int is_preselected = ( blok->
iluklvl <= max_ilulvl );
141 if ( nrows < lowrank->compress_min_height ) {
145 if ( is_preselected ) {
149 gain = nrows * ncols;
156 if ( lrA->
rk == -1 ) {
160 if ( lrA->
rk != -1 ) {
161 gainL += gain - ((nrows+ncols) * lrA->
rk);
169 if ( lrA->
rk == -1 ) {
173 if ( lrA->
rk != -1 ) {
174 gainU += gain - ((nrows+ncols) * lrA->
rk);
179 return gainL + gainU;
211 for (; blok<lblok; blok++)
230 for (; blok<lblok; blok++)
295 assert( cblk->
ownerid == solvmtx->clustnum );
298 if ( cblk->
cblktype & CBLK_COMPRESSED ) {
303 for (; blok<lblok; blok++)
307 size = nrows * ncols;
315 gaintmp = (size - ((nrows+ncols) * blok->
LRblock[0]->
rkmax));
316 assert( gaintmp >= 0 );
324 gaintmp = (size - ((nrows+ncols) * blok->
LRblock[1]->
rkmax));
325 assert( gaintmp >= 0 );
BEGIN_C_DECLS typedef int pastix_int_t
float _Complex pastix_complex32_t
void cpucblk_cmemory(pastix_coefside_t side, const SolverMatrix *solvmtx, SolverCblk *cblk, pastix_int_t *orig, pastix_int_t *gain)
Return the memory gain of the low-rank form over the full-rank form for a single column-block.
void cpucblk_cuncompress(pastix_coefside_t side, SolverCblk *cblk)
Uncompress a single column block from low-rank format to full-rank format.
pastix_fixdbl_t cpublok_ccompress(const pastix_lr_t *lowrank, pastix_int_t M, pastix_int_t N, pastix_lrblock_t *lrA)
Compress a single block from full-rank to low-rank format.
pastix_int_t cpucblk_ccompress(const SolverMatrix *solvmtx, pastix_coefside_t side, int max_ilulvl, SolverCblk *cblk)
Compress a single column block from full-rank to low-rank format.
Structure to define the type of function to use for the low-rank kernels and their parameters.
The block low-rank structure to hold a matrix in low-rank form.
int core_clr2ge(pastix_trans_t trans, pastix_int_t m, pastix_int_t n, const pastix_lrblock_t *Alr, pastix_complex32_t *A, pastix_int_t lda)
Convert a low rank matrix into a dense matrix.
void core_clralloc(pastix_int_t M, pastix_int_t N, pastix_int_t rkmax, pastix_lrblock_t *A)
Allocate a low-rank matrix.
void core_clrfree(pastix_lrblock_t *A)
Free a low-rank matrix.
enum pastix_coefside_e pastix_coefside_t
Data blocks used in the kernel.
static pastix_int_t blok_rownbr(const SolverBlok *blok)
Compute the number of rows of a block.
static pastix_int_t cblk_colnbr(const SolverCblk *cblk)
Compute the number of columns in a column block.
static int blok_is_preselected(const SolverCblk *cblk, const SolverBlok *blok, const SolverCblk *fcbk)
Return if a block is preselected as either part of the projection, or as a sub-diagonal block.
pastix_lrblock_t * LRblock[2]
SolverCblk *restrict cblktab
Solver column block structure.
Solver column block structure.