PaStiX Handbook  6.3.2
cpublok_cadd.c File Reference
#include "common/common.h"
#include "blend/solver.h"
#include "kernels_trace.h"
#include "pastix_ccores.h"
#include "pastix_clrcores.h"

Go to the source code of this file.

Functions

static pastix_fixdbl_t cpublok_cadd_frlr (pastix_complex32_t alpha, const SolverCblk *cblkA, SolverCblk *cblkB, pastix_int_t blokA_m, pastix_int_t blokB_m, const pastix_complex32_t *A, pastix_lrblock_t *lrB, pastix_complex32_t *work, pastix_int_t lwork, const pastix_lr_t *lowrank)
 Add a blok in full rank format to a blok in low rank format. More...
 
static pastix_fixdbl_t cpublok_cadd_lrlr (pastix_complex32_t alpha, const SolverCblk *cblkA, SolverCblk *cblkB, pastix_int_t blokA_m, pastix_int_t blokB_m, const pastix_lrblock_t *lrA, pastix_lrblock_t *lrB, pastix_complex32_t *work, pastix_int_t lwork, const pastix_lr_t *lowrank)
 Add two column bloks in low rank format. More...
 
static pastix_fixdbl_t cpublok_cadd_frfr (pastix_complex32_t alpha, const SolverCblk *cblkA, SolverCblk *cblkB, pastix_int_t blokA_m, pastix_int_t blokB_m, const pastix_complex32_t *A, pastix_complex32_t *B)
 Add two bloks in full rank format. More...
 
pastix_fixdbl_t cpublok_cadd (pastix_complex32_t alpha, const SolverCblk *cblkA, SolverCblk *cblkB, pastix_int_t blokA_m, pastix_int_t blokB_m, const void *A, void *B, pastix_complex32_t *work, pastix_int_t lwork, const pastix_lr_t *lowrank)
 Add two bloks. More...
 

Detailed Description

Precision dependent routines to add different bloks.

Version
6.3.1
Author
Mathieu Faverge
Alycia Lisito
Date
2023-12-01
Generated arithmetic file
from /builds/solverstack/pastix/kernels/cpublok_zadd.c, normal z -> c, Wed Dec 13 12:09:16 2023

Definition in file cpublok_cadd.c.

Function Documentation

◆ cpublok_cadd_frlr()

static pastix_fixdbl_t cpublok_cadd_frlr ( pastix_complex32_t  alpha,
const SolverCblk cblkA,
SolverCblk cblkB,
pastix_int_t  blokA_m,
pastix_int_t  blokB_m,
const pastix_complex32_t A,
pastix_lrblock_t lrB,
pastix_complex32_t work,
pastix_int_t  lwork,
const pastix_lr_t lowrank 
)
inlinestatic

Add a blok in full rank format to a blok in low rank format.

The second cblk is overwritten by the sum of the two blocks. B <- alpha * A + B

Parameters
[in]alphaThe scalar alpha
[in]cblkAThe column block of the A matrix.
[in,out]cblkBThe column block of the B matrix On exit, cblkB coefficient arrays are overwritten by the result of alpha * A + B.
[in]blokA_mIndex of the first off-diagonal block in cblk, that is used for A.
[in]blokB_mIndex of the first off-diagonal block in cblk, that is used for B.
[in,out]AThe pointer to the coeftab of the blok.lcoeftab matrix storing the coefficients of the panel when the Lower part is computed, blok.ucoeftab otherwise. Must be of size blok.stride -by- blok.width
[in]lrBPointer to the low-rank representation of the column block B. Must be followed by the low-rank representation of the following blocks.
[in]workTemporary memory buffer.
[in]lworkTemporary workspace dimension.
[in]lowrankThe structure with low-rank parameters.
Returns
The number of flops of the operation.

Definition at line 75 of file cpublok_cadd.c.

References core_clrmm_s::A, core_clrmm_s::alpha, core_clrmm_s::B, core_clrmm_s::beta, blok_rownbr(), core_clrmm_s::C, cblk_colnbr(), solver_cblk_s::cblktype, core_clrmm_s::Cm, core_clrmm_s::Cn, solver_blok_s::coefind, core_clradd(), solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_cblk_s::fcolnum, solver_blok_s::frownum, is_block_inside_fblock(), core_clrmm_s::K, solver_cblk_s::lock, core_clrmm_s::lock, core_clrmm_s::lowrank, core_clrmm_s::lwork, core_clrmm_s::lwused, core_clrmm_s::M, core_clrmm_s::N, core_clrmm_s::offx, core_clrmm_s::offy, PastixNoTrans, pastix_lrblock_s::rk, pastix_lrblock_s::rkmax, core_clrmm_s::transA, core_clrmm_s::transB, pastix_lrblock_s::u, pastix_lrblock_s::v, and core_clrmm_s::work.

Referenced by cpublok_cadd().

◆ cpublok_cadd_lrlr()

static pastix_fixdbl_t cpublok_cadd_lrlr ( pastix_complex32_t  alpha,
const SolverCblk cblkA,
SolverCblk cblkB,
pastix_int_t  blokA_m,
pastix_int_t  blokB_m,
const pastix_lrblock_t lrA,
pastix_lrblock_t lrB,
pastix_complex32_t work,
pastix_int_t  lwork,
const pastix_lr_t lowrank 
)
inlinestatic

Add two column bloks in low rank format.

The second cblk is overwritten by the sum of the two blocks. B <- alpha * A + B

Parameters
[in]alphaThe scalar alpha
[in]cblkAThe column block of the A matrix.
[in,out]cblkBThe column block of the B matrix On exit, cblkB coefficient arrays are overwritten by the result of alpha * A + B.
[in]blokA_mIndex of the first off-diagonal block in cblk, that is used for A.
[in]blokB_mIndex of the first off-diagonal block in cblk, that is used for B.
[in]lrAPointer to the low-rank representation of the column block A. Must be followed by the low-rank representation of the following blocks.
[in]lrBPointer to the low-rank representation of the column block B. Must be followed by the low-rank representation of the following blocks.
[in]workTemporary memory buffer.
[in]lworkTemporary workspace dimension.
[in]lowrankThe structure with low-rank parameters.
Returns
The number of flops of the operation.

Definition at line 206 of file cpublok_cadd.c.

References core_clrmm_s::A, core_clrmm_s::alpha, core_clrmm_s::B, core_clrmm_s::beta, blok_rownbr(), core_clrmm_s::C, cblk_colnbr(), solver_cblk_s::cblktype, core_clrmm_s::Cm, core_clrmm_s::Cn, core_clradd(), solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_cblk_s::fcolnum, solver_blok_s::frownum, is_block_inside_fblock(), core_clrmm_s::K, solver_cblk_s::lock, core_clrmm_s::lock, core_clrmm_s::lowrank, core_clrmm_s::lwork, core_clrmm_s::lwused, core_clrmm_s::M, core_clrmm_s::N, core_clrmm_s::offx, core_clrmm_s::offy, PASTIX_LRM3_ORTHOU, PastixNoTrans, core_clrmm_s::transA, core_clrmm_s::transB, and core_clrmm_s::work.

Referenced by cpublok_cadd().

◆ cpublok_cadd_frfr()

static pastix_fixdbl_t cpublok_cadd_frfr ( pastix_complex32_t  alpha,
const SolverCblk cblkA,
SolverCblk cblkB,
pastix_int_t  blokA_m,
pastix_int_t  blokB_m,
const pastix_complex32_t A,
pastix_complex32_t B 
)
inlinestatic

Add two bloks in full rank format.

The second cblk is overwritten by the sum of the two blocks. B <- alpha * A + B

Parameters
[in]alphaThe scalar alpha
[in]cblkAThe column block of the A matrix.
[in,out]cblkBThe column block of the B matrix On exit, cblkB coefficient arrays are overwritten by the result of alpha * A + B.
[in]blokA_mIndex of the first off-diagonal block in cblk, that is used for A.
[in]blokB_mIndex of the first off-diagonal block in cblk, that is used for B.
[in,out]AThe pointer to the coeftab of the blok.lcoeftab matrix storing the coefficients of the panel when the Lower part is computed, blok.ucoeftab otherwise. Must be of size blok.stride -by- blok.width
[in,out]BThe pointer to the coeftab of the blok.lcoeftab matrix storing the coefficients of the panel, if Symmetric/Hermitian cases or if upper part is computed; blok.ucoeftab otherwise. Must be of size blok.stride -by- blok.width
Returns
The number of flops of the operation.

Definition at line 314 of file cpublok_cadd.c.

References blok_rownbr(), cblk_colnbr(), solver_cblk_s::cblktype, solver_blok_s::coefind, core_cgeadd(), solver_cblk_s::fblokptr, solver_blok_s::fcblknm, solver_cblk_s::fcolnum, solver_blok_s::frownum, is_block_inside_fblock(), pastix_int_t, and PastixNoTrans.

Referenced by cpublok_cadd().