PaStiX Handbook  6.2.1
Sparse matrix blocked CSC structure

Describe all the internals routines to manipulate the internal block csc. More...

Modules

 Internal functions to the sparse matrix blocked CSC module
 

Data Structures

struct  bcsc_cblk_s
 Compressed colptr format for the bcsc. More...
 
struct  pastix_bcsc_s
 Internal column block distributed CSC matrix. More...
 

Typedefs

typedef struct bcsc_cblk_s bcsc_cblk_t
 Compressed colptr format for the bcsc.
 

Functions

double bcscInit (const spmatrix_t *spm, const pastix_order_t *ord, const SolverMatrix *solvmtx, pastix_int_t initAt, pastix_bcsc_t *bcsc)
 Initialize the block csc matrix. More...
 
void bcscExit (pastix_bcsc_t *bcsc)
 Cleanup the block csc structure but do not free the bcsc pointer. More...
 
void * bvec_malloc (size_t size)
 Allocate a vector. More...
 
void bvec_free (void *x)
 Free a vector. More...
 
static void pthread_bvec_cnrm2 (isched_thread_t *ctx, void *args)
 Compute the norm 2 of a vector. (Parallel version) More...
 
static void pthread_bvec_cscal (isched_thread_t *ctx, void *args)
 Scale a vector (Parallel version) More...
 
static void pthread_bvec_snrm2 (isched_thread_t *ctx, void *args)
 Compute the norm 2 of a vector. (Parallel version) More...
 
static void pthread_bvec_sscal (isched_thread_t *ctx, void *args)
 Scale a vector (Parallel version) More...
 
static void pthread_bvec_znrm2 (isched_thread_t *ctx, void *args)
 Compute the norm 2 of a vector. (Parallel version) More...
 
static void pthread_bvec_zscal (isched_thread_t *ctx, void *args)
 Scale a vector (Parallel version) More...
 
static void pthread_bvec_dnrm2 (isched_thread_t *ctx, void *args)
 Compute the norm 2 of a vector. (Parallel version) More...
 
static void pthread_bvec_dscal (isched_thread_t *ctx, void *args)
 Scale a vector (Parallel version) More...
 

PastixComplex32 vector(s) operations

void bvec_caxpy_seq (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex32_t alpha, const pastix_complex32_t *x, pastix_complex32_t *y)
 Compute y <- alpha * x + y. (Sequential version) More...
 
void bvec_caxpy_smp (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex32_t alpha, const pastix_complex32_t *x, pastix_complex32_t *y)
 Perform y = alpha * x + y (Parallel version) More...
 
void bvec_ccopy_seq (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex32_t *x, pastix_complex32_t *y)
 Copy a vector y = x (Sequential version) More...
 
void bvec_ccopy_smp (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex32_t *x, pastix_complex32_t *y)
 Copy a vector y = x (parallel version) More...
 
pastix_complex32_t bvec_cdotu_seq (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex32_t *x, const pastix_complex32_t *y)
 Compute the scalar product x.y. (Sequential version) More...
 
pastix_complex32_t bvec_cdotu_smp (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex32_t *x, const pastix_complex32_t *y)
 Compute a regular scalar product x.y (Parallel version) More...
 
void bvec_cgemv_seq (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_complex32_t alpha, const pastix_complex32_t *A, pastix_int_t lda, const pastix_complex32_t *x, pastix_complex32_t beta, pastix_complex32_t *y)
 Compute. More...
 
void bvec_cgemv_smp (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_complex32_t alpha, const pastix_complex32_t *A, pastix_int_t lda, const pastix_complex32_t *x, pastix_complex32_t beta, pastix_complex32_t *y)
 Compute. More...
 
float bvec_cnrm2_seq (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex32_t *x)
 Compute the norm 2 of a vector. (Sequential version) More...
 
float bvec_cnrm2_smp (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex32_t *x)
 Compute the norm 2 of a vector. (Parallel version) More...
 
void bvec_cscal_seq (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex32_t alpha, pastix_complex32_t *x)
 Scale a vector by the scalar alpha. (Sequential version) More...
 
void bvec_cscal_smp (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex32_t alpha, pastix_complex32_t *x)
 Scale a vector (Parallel version) More...
 
int bvec_clapmr (int thread_safe, pastix_dir_t dir, pastix_int_t m, pastix_int_t n, pastix_complex32_t *A, pastix_int_t lda, pastix_int_t *perm)
 Apply a row permutation to a matrix A (LAPACK xlatmr) More...
 

PastixComplex32 matrix operations

float bcsc_cnorm (pastix_normtype_t ntype, const pastix_bcsc_t *bcsc)
 Compute the norm of an bcsc matrix. More...
 
void bcsc_cspsv (pastix_data_t *pastix_data, pastix_complex32_t *b)
 Solve A x = b with A the sparse matrix. More...
 
void bcsc_cspmv (const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex32_t alpha, const pastix_complex32_t *x, pastix_complex32_t beta, pastix_complex32_t *y)
 Compute the matrix-vector product y = alpha * op(A) * x + beta * y. More...
 
void bcsc_cspmv_seq (const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex32_t alpha, const pastix_complex32_t *x, pastix_complex32_t beta, pastix_complex32_t *y)
 Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version) More...
 
void bcsc_cspmv_smp (const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex32_t alpha, const pastix_complex32_t *x, pastix_complex32_t beta, pastix_complex32_t *y)
 Perform y = alpha A x + beta y (Parallel version) More...
 

PastixComplex32 MPI vector operations

void bvec_cnullify_remote (const pastix_data_t *pastix_data, pastix_complex32_t *y)
 Set to 0 remote coefficients. More...
 
void bvec_callreduce (const pastix_data_t *pastix_data, pastix_complex32_t *y)
 Apply an all reduce of the vector on all nodes. More...
 

PastixFloat vector(s) operations

void bvec_saxpy_seq (pastix_data_t *pastix_data, pastix_int_t n, float alpha, const float *x, float *y)
 Compute y <- alpha * x + y. (Sequential version) More...
 
void bvec_saxpy_smp (pastix_data_t *pastix_data, pastix_int_t n, float alpha, const float *x, float *y)
 Perform y = alpha * x + y (Parallel version) More...
 
void bvec_scopy_seq (pastix_data_t *pastix_data, pastix_int_t n, const float *x, float *y)
 Copy a vector y = x (Sequential version) More...
 
void bvec_scopy_smp (pastix_data_t *pastix_data, pastix_int_t n, const float *x, float *y)
 Copy a vector y = x (parallel version) More...
 
float bvec_sdot_seq (pastix_data_t *pastix_data, pastix_int_t n, const float *x, const float *y)
 Compute the scalar product x.y. (Sequential version) More...
 
float bvec_sdot_smp (pastix_data_t *pastix_data, pastix_int_t n, const float *x, const float *y)
 Compute a regular scalar product x.y (Parallel version) More...
 
void bvec_sgemv_seq (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, float alpha, const float *A, pastix_int_t lda, const float *x, float beta, float *y)
 Compute. More...
 
void bvec_sgemv_smp (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, float alpha, const float *A, pastix_int_t lda, const float *x, float beta, float *y)
 Compute. More...
 
float bvec_snrm2_seq (pastix_data_t *pastix_data, pastix_int_t n, const float *x)
 Compute the norm 2 of a vector. (Sequential version) More...
 
float bvec_snrm2_smp (pastix_data_t *pastix_data, pastix_int_t n, const float *x)
 Compute the norm 2 of a vector. (Parallel version) More...
 
void bvec_sscal_seq (pastix_data_t *pastix_data, pastix_int_t n, float alpha, float *x)
 Scale a vector by the scalar alpha. (Sequential version) More...
 
void bvec_sscal_smp (pastix_data_t *pastix_data, pastix_int_t n, float alpha, float *x)
 Scale a vector (Parallel version) More...
 
int bvec_slapmr (int thread_safe, pastix_dir_t dir, pastix_int_t m, pastix_int_t n, float *A, pastix_int_t lda, pastix_int_t *perm)
 Apply a row permutation to a matrix A (LAPACK xlatmr) More...
 

PastixFloat matrix operations

float bcsc_snorm (pastix_normtype_t ntype, const pastix_bcsc_t *bcsc)
 Compute the norm of an bcsc matrix. More...
 
void bcsc_sspsv (pastix_data_t *pastix_data, float *b)
 Solve A x = b with A the sparse matrix. More...
 
void bcsc_sspmv (const pastix_data_t *pastix_data, pastix_trans_t trans, float alpha, const float *x, float beta, float *y)
 Compute the matrix-vector product y = alpha * op(A) * x + beta * y. More...
 
void bcsc_sspmv_seq (const pastix_data_t *pastix_data, pastix_trans_t trans, float alpha, const float *x, float beta, float *y)
 Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version) More...
 
void bcsc_sspmv_smp (const pastix_data_t *pastix_data, pastix_trans_t trans, float alpha, const float *x, float beta, float *y)
 Perform y = alpha A x + beta y (Parallel version) More...
 

PastixFloat MPI vector operations

void bvec_snullify_remote (const pastix_data_t *pastix_data, float *y)
 Set to 0 remote coefficients. More...
 
void bvec_sallreduce (const pastix_data_t *pastix_data, float *y)
 Apply an all reduce of the vector on all nodes. More...
 

PastixComplex64 vector(s) operations

void bvec_zaxpy_seq (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t *y)
 Compute y <- alpha * x + y. (Sequential version) More...
 
void bvec_zaxpy_smp (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t *y)
 Perform y = alpha * x + y (Parallel version) More...
 
void bvec_zcopy_seq (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, pastix_complex64_t *y)
 Copy a vector y = x (Sequential version) More...
 
void bvec_zcopy_smp (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, pastix_complex64_t *y)
 Copy a vector y = x (parallel version) More...
 
pastix_complex64_t bvec_zdotu_seq (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, const pastix_complex64_t *y)
 Compute the scalar product x.y. (Sequential version) More...
 
pastix_complex64_t bvec_zdotu_smp (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x, const pastix_complex64_t *y)
 Compute a regular scalar product x.y (Parallel version) More...
 
void bvec_zgemv_seq (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *A, pastix_int_t lda, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
 Compute. More...
 
void bvec_zgemv_smp (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, pastix_complex64_t alpha, const pastix_complex64_t *A, pastix_int_t lda, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
 Compute. More...
 
double bvec_znrm2_seq (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x)
 Compute the norm 2 of a vector. (Sequential version) More...
 
double bvec_znrm2_smp (pastix_data_t *pastix_data, pastix_int_t n, const pastix_complex64_t *x)
 Compute the norm 2 of a vector. (Parallel version) More...
 
void bvec_zscal_seq (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, pastix_complex64_t *x)
 Scale a vector by the scalar alpha. (Sequential version) More...
 
void bvec_zscal_smp (pastix_data_t *pastix_data, pastix_int_t n, pastix_complex64_t alpha, pastix_complex64_t *x)
 Scale a vector (Parallel version) More...
 
int bvec_zlapmr (int thread_safe, pastix_dir_t dir, pastix_int_t m, pastix_int_t n, pastix_complex64_t *A, pastix_int_t lda, pastix_int_t *perm)
 Apply a row permutation to a matrix A (LAPACK xlatmr) More...
 

PastixComplex64 matrix operations

double bcsc_znorm (pastix_normtype_t ntype, const pastix_bcsc_t *bcsc)
 Compute the norm of an bcsc matrix. More...
 
void bcsc_zspsv (pastix_data_t *pastix_data, pastix_complex64_t *b)
 Solve A x = b with A the sparse matrix. More...
 
void bcsc_zspmv (const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
 Compute the matrix-vector product y = alpha * op(A) * x + beta * y. More...
 
void bcsc_zspmv_seq (const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
 Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version) More...
 
void bcsc_zspmv_smp (const pastix_data_t *pastix_data, pastix_trans_t trans, pastix_complex64_t alpha, const pastix_complex64_t *x, pastix_complex64_t beta, pastix_complex64_t *y)
 Perform y = alpha A x + beta y (Parallel version) More...
 

PastixComplex64 MPI vector operations

void bvec_znullify_remote (const pastix_data_t *pastix_data, pastix_complex64_t *y)
 Set to 0 remote coefficients. More...
 
void bvec_zallreduce (const pastix_data_t *pastix_data, pastix_complex64_t *y)
 Apply an all reduce of the vector on all nodes. More...
 

PastixDouble vector(s) operations

void bvec_daxpy_seq (pastix_data_t *pastix_data, pastix_int_t n, double alpha, const double *x, double *y)
 Compute y <- alpha * x + y. (Sequential version) More...
 
void bvec_daxpy_smp (pastix_data_t *pastix_data, pastix_int_t n, double alpha, const double *x, double *y)
 Perform y = alpha * x + y (Parallel version) More...
 
void bvec_dcopy_seq (pastix_data_t *pastix_data, pastix_int_t n, const double *x, double *y)
 Copy a vector y = x (Sequential version) More...
 
void bvec_dcopy_smp (pastix_data_t *pastix_data, pastix_int_t n, const double *x, double *y)
 Copy a vector y = x (parallel version) More...
 
double bvec_ddot_seq (pastix_data_t *pastix_data, pastix_int_t n, const double *x, const double *y)
 Compute the scalar product x.y. (Sequential version) More...
 
double bvec_ddot_smp (pastix_data_t *pastix_data, pastix_int_t n, const double *x, const double *y)
 Compute a regular scalar product x.y (Parallel version) More...
 
void bvec_dgemv_seq (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, double alpha, const double *A, pastix_int_t lda, const double *x, double beta, double *y)
 Compute. More...
 
void bvec_dgemv_smp (pastix_data_t *pastix_data, pastix_int_t m, pastix_int_t n, double alpha, const double *A, pastix_int_t lda, const double *x, double beta, double *y)
 Compute. More...
 
double bvec_dnrm2_seq (pastix_data_t *pastix_data, pastix_int_t n, const double *x)
 Compute the norm 2 of a vector. (Sequential version) More...
 
double bvec_dnrm2_smp (pastix_data_t *pastix_data, pastix_int_t n, const double *x)
 Compute the norm 2 of a vector. (Parallel version) More...
 
void bvec_dscal_seq (pastix_data_t *pastix_data, pastix_int_t n, double alpha, double *x)
 Scale a vector by the scalar alpha. (Sequential version) More...
 
void bvec_dscal_smp (pastix_data_t *pastix_data, pastix_int_t n, double alpha, double *x)
 Scale a vector (Parallel version) More...
 
int bvec_dlapmr (int thread_safe, pastix_dir_t dir, pastix_int_t m, pastix_int_t n, double *A, pastix_int_t lda, pastix_int_t *perm)
 Apply a row permutation to a matrix A (LAPACK xlatmr) More...
 

PastixDouble matrix operations

double bcsc_dnorm (pastix_normtype_t ntype, const pastix_bcsc_t *bcsc)
 Compute the norm of an bcsc matrix. More...
 
void bcsc_dspsv (pastix_data_t *pastix_data, double *b)
 Solve A x = b with A the sparse matrix. More...
 
void bcsc_dspmv (const pastix_data_t *pastix_data, pastix_trans_t trans, double alpha, const double *x, double beta, double *y)
 Compute the matrix-vector product y = alpha * op(A) * x + beta * y. More...
 
void bcsc_dspmv_seq (const pastix_data_t *pastix_data, pastix_trans_t trans, double alpha, const double *x, double beta, double *y)
 Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version) More...
 
void bcsc_dspmv_smp (const pastix_data_t *pastix_data, pastix_trans_t trans, double alpha, const double *x, double beta, double *y)
 Perform y = alpha A x + beta y (Parallel version) More...
 

PastixDouble MPI vector operations

void bvec_dnullify_remote (const pastix_data_t *pastix_data, double *y)
 Set to 0 remote coefficients. More...
 
void bvec_dallreduce (const pastix_data_t *pastix_data, double *y)
 Apply an all reduce of the vector on all nodes. More...
 

Detailed Description

Describe all the internals routines to manipulate the internal block csc.

These functions provide a set of subroutines to manipulate the permuted sparse matrix stored in block of columns following the partition.


Data Type Documentation

◆ bcsc_cblk_s

struct bcsc_cblk_s

Compressed colptr format for the bcsc.

Definition at line 28 of file bcsc.h.

Data Fields
pastix_int_t colnbr

Number of columns in the block column.

pastix_int_t cblknum

Index of the corresponding cblk in the local solver matrix

pastix_int_t * coltab

Array of indexes of the start of each column in the row and value arrays.

◆ pastix_bcsc_s

struct pastix_bcsc_s

Internal column block distributed CSC matrix.

Definition at line 37 of file bcsc.h.

Data Fields
int gN

Global number of vertices

int n

Local number of vertices

int mtxtype

Matrix structure: PastixGeneral, PastixSymmetric or PastixHermitian.

int flttype

valtab datatype: PastixFloat, PastixDouble, PastixComplex32 or PastixComplex64

pastix_int_t cscfnbr

Number of column blocks.

bcsc_cblk_t * cscftab

Array of Block column structures of size cscfnbr. (<pastix_bcscFormat_t>)

pastix_int_t * rowtab

Array of rows in the matrix.

void * Lvalues

Array of values of the matrix A

void * Uvalues

Array of values of the matrix A^t

Function Documentation

◆ bcscInit()

double bcscInit ( const spmatrix_t *  spm,
const pastix_order_t ord,
const SolverMatrix *  solvmtx,
pastix_int_t  initAt,
pastix_bcsc_t bcsc 
)

Initialize the block csc matrix.

The block csc matrix is used to initialize the factorized matrix, and to perform the matvec operations in refinement.

Parameters
[in]spmThe initial sparse matrix in the spm format.
[in]ordThe ordering that needs to be applied on the spm to generate the block csc.
[in]solvmtxThe solver matrix structure that describe the data distribution.
[in]initAtA flag to enable/disable the initialization of A'
[in,out]bcscOn entry, the pointer to an allocated bcsc. On exit, the bcsc stores the input spm with the permutation applied and grouped accordingly to the distribution described in solvmtx.
Returns
The time spent to initialize the bcsc structure.

Definition at line 389 of file bcsc.c.

References pastix_order_s::baseval, bcsc_init_centralized(), and pastix_order_s::vertnbr.

◆ bcscExit()

void bcscExit ( pastix_bcsc_t bcsc)

Cleanup the block csc structure but do not free the bcsc pointer.

Parameters
[in,out]bcscThe block csc matrix to free.

Definition at line 437 of file bcsc.c.

References bcsc_cblk_s::coltab, pastix_bcsc_s::cscftab, pastix_bcsc_s::Lvalues, pastix_bcsc_s::rowtab, and pastix_bcsc_s::Uvalues.

Referenced by pastixFinalize().

◆ bvec_malloc()

void * bvec_malloc ( size_t  size)

Allocate a vector.

Parameters
[in]sizeThe size of the vector
Returns
The allocated vector

Definition at line 35 of file bvec.c.

Referenced by c_refine_init(), d_refine_init(), s_refine_init(), and z_refine_init().

◆ bvec_free()

void bvec_free ( void *  x)

Free a vector.

Parameters
[in,out]xThe vector to be free

Definition at line 55 of file bvec.c.

Referenced by c_refine_init(), d_refine_init(), s_refine_init(), and z_refine_init().

◆ bvec_caxpy_seq()

void bvec_caxpy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex32_t  alpha,
const pastix_complex32_t *  x,
pastix_complex32_t *  y 
)

Compute y <- alpha * x + y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...). -*
[in]nThe size of the vectors.
[in]alphaA scalar.
[in]xThe vector x.
[in,out]yThe vector y.

Definition at line 387 of file bvec_ccompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by c_refine_init().

◆ bvec_caxpy_smp()

void bvec_caxpy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex32_t  alpha,
const pastix_complex32_t *  x,
pastix_complex32_t *  y 
)

Perform y = alpha * x + y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]alphaThe scalar to scale x
[in]xThe vector to be scaled
[in,out]yThe resulting solution

Definition at line 502 of file bvec_ccompute.c.

References pthread_bvec_caxpy().

Referenced by c_refine_init().

◆ bvec_ccopy_seq()

void bvec_ccopy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex32_t *  x,
pastix_complex32_t *  y 
)

Copy a vector y = x (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 995 of file bvec_ccompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by c_refine_init().

◆ bvec_ccopy_smp()

void bvec_ccopy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex32_t *  x,
pastix_complex32_t *  y 
)

Copy a vector y = x (parallel version)

   Initialise argument for the parallel function
Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 1096 of file bvec_ccompute.c.

References pthread_bvec_ccopy().

Referenced by c_refine_init().

◆ bvec_cdotu_seq()

pastix_complex32_t bvec_cdotu_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex32_t *  x,
const pastix_complex32_t *  y 
)

Compute the scalar product x.y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]xThe vector x.
[in]yThe vector y.
[in]nThe size of the vectors.
Return values
thescalar product of x and y.

Definition at line 705 of file bvec_ccompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

◆ bvec_cdotu_smp()

pastix_complex32_t bvec_cdotu_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex32_t *  x,
const pastix_complex32_t *  y 
)

Compute a regular scalar product x.y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x, y and r
[in]xThe first vector of the scalar product
[in]yThe second vector of the scalar product
[out]rThe result of the scalar product
Returns
The allocated vector

Definition at line 826 of file bvec_ccompute.c.

References pthread_bvec_cdotu().

◆ bvec_cgemv_seq()

void bvec_cgemv_seq ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
pastix_complex32_t  alpha,
const pastix_complex32_t *  A,
pastix_int_t  lda,
const pastix_complex32_t *  x,
pastix_complex32_t  beta,
pastix_complex32_t *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1171 of file bvec_ccompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by c_refine_init().

◆ bvec_cgemv_smp()

void bvec_cgemv_smp ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
pastix_complex32_t  alpha,
const pastix_complex32_t *  A,
pastix_int_t  lda,
const pastix_complex32_t *  x,
pastix_complex32_t  beta,
pastix_complex32_t *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1320 of file bvec_ccompute.c.

References pthread_bvec_cgemv().

Referenced by c_refine_init().

◆ bvec_cnrm2_seq()

float bvec_cnrm2_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex32_t *  x 
)

Compute the norm 2 of a vector. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]xThe vector x of size n.
Return values
thenorm 2 of x.

Definition at line 70 of file bvec_ccompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by c_refine_init().

◆ bvec_cnrm2_smp()

float bvec_cnrm2_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex32_t *  x 
)

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]xThe vector which norm2 is to be computed
[in]nThe number of elements of x
Returns
The norm 2 of the vector

Definition at line 214 of file bvec_ccompute.c.

References pthread_bvec_cnrm2().

Referenced by c_refine_init().

◆ bvec_cscal_seq()

void bvec_cscal_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex32_t  alpha,
pastix_complex32_t *  x 
)

Scale a vector by the scalar alpha. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]alphaThe scalar to scale the vector x.
[in,out]xThe vector x to scale.

Definition at line 248 of file bvec_ccompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by c_refine_init().

◆ bvec_cscal_smp()

void bvec_cscal_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex32_t  alpha,
pastix_complex32_t *  x 
)

Scale a vector (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of the vector
[in]alphaThe scaling parameter
[in,out]xThe vector to be scaled

Definition at line 351 of file bvec_ccompute.c.

References pthread_bvec_cscal().

Referenced by c_refine_init().

◆ bvec_clapmr()

int bvec_clapmr ( int  thread_safe,
pastix_dir_t  dir,
pastix_int_t  m,
pastix_int_t  n,
pastix_complex32_t *  A,
pastix_int_t  lda,
pastix_int_t *  perm 
)

Apply a row permutation to a matrix A (LAPACK xlatmr)

Parameters
[in]thread_safeBoolean to switch between the thread-safe implementation that exploits an additional workspace, or the non thread-safe version that has no memory overhead.
[in]mThe number of rows in the matrix A, and the number of elements in perm.
[in]nThe number of columns in the matrix A.
[in,out]AA matrix of size lda-by-n. On exit, rowas are permuted and A contains P A.
[in]ldaThe leading dimension of A.
[in,out]permThe permutation array. Must be 0 based. If thread_safe is true, then perm array is used only as input, and a temporary array is allocated to follow the cycles. If thread_safe is false, then perm array is modified during the swap and restored at the end of the call.
Return values
PASTIX_SUCCESS

Definition at line 878 of file bvec_ccompute.c.

References PASTIX_SUCCESS, and PastixDirBackward.

◆ bcsc_cnorm()

float bcsc_cnorm ( pastix_normtype_t  ntype,
const pastix_bcsc_t bcsc 
)

Compute the norm of an bcsc matrix.

Parameters
[in]ntype= PastixMaxNorm: Max norm = PastixOneNorm: One norm = PastixInfNorm: Infinity norm = PastixFrobeniusNorm: Frobenius norm
[in]bcscThe bcsc structure describing the matrix.
Return values
Thenorm of the matrix.

Definition at line 252 of file bcsc_cnorm.c.

References bcsc_cnorm_frobenius(), bcsc_cnorm_inf(), bcsc_cnorm_max(), bcsc_cnorm_one(), PastixFrobeniusNorm, PastixInfNorm, PastixMaxNorm, and PastixOneNorm.

◆ bcsc_cspsv()

void bcsc_cspsv ( pastix_data_t *  pastix_data,
pastix_complex32_t *  b 
)

Solve A x = b with A the sparse matrix.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[in,out]dOn entry, the right hand side On exit, the solution of tha problem A x = b

Definition at line 1122 of file bvec_ccompute.c.

References IPARM_VERBOSE, and pastix_subtask_solve().

Referenced by c_refine_init().

◆ bcsc_cspmv()

void bcsc_cspmv ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
pastix_complex32_t  alpha,
const pastix_complex32_t *  x,
pastix_complex32_t  beta,
pastix_complex32_t *  y 
)

Compute the matrix-vector product y = alpha * op(A) * x + beta * y.

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars. The op function is specified by the trans parameter and performs the operation as follows: trans = PastixNoTrans y := alpha*A *x + beta*y trans = PastixTrans y := alpha*A' *x + beta*y trans = PastixConjTrans y := alpha*conjf(A')*x + beta*y

This function is used only in testings.

Parameters
[in]pastix_dataProvide information about bcsc, and select the scheduling version based on iparm[IPARM_SCHEDULER].
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixConjTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 626 of file bcsc_cspmv.c.

References bcsc_cspmv_seq(), bcsc_cspmv_smp(), bvec_callreduce(), bvec_cnullify_remote(), IPARM_SCHEDULER, IPARM_TRANSPOSE_SOLVE, PastixNoTrans, PastixSchedDynamic, and PastixSchedStatic.

Referenced by c_refine_init().

◆ bcsc_cspmv_seq()

void bcsc_cspmv_seq ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
pastix_complex32_t  alpha,
const pastix_complex32_t *  x,
pastix_complex32_t  beta,
pastix_complex32_t *  y 
)

Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version)

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars.

Parameters
[in]pastix_dataProvide information about bcsc
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixConjTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 244 of file bcsc_cspmv.c.

References pastix_bcsc_s::cscfnbr.

Referenced by bcsc_cspmv().

◆ bcsc_cspmv_smp()

void bcsc_cspmv_smp ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
pastix_complex32_t  alpha,
const pastix_complex32_t *  x,
pastix_complex32_t  beta,
pastix_complex32_t *  y 
)

Perform y = alpha A x + beta y (Parallel version)

This functions is parallelized through the internal static scheduler.

Parameters
[in]pastix_dataThe pastix_data structure that holds the A matrix.
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixConjTrans: A is conjugate transposed.
[in]alphaThe scalar alpha.
[in]xThe vector x
[in]betaThe scalar beta.
[in,out]yOn entry, the vector y On exit, alpha A x + y

Definition at line 549 of file bcsc_cspmv.c.

References bcsc_cspmv_get_balanced_indexes(), pthread_bcsc_cspmv(), and pthread_bcsc_cspmv_tasktab().

Referenced by bcsc_cspmv().

◆ bvec_cnullify_remote()

void bvec_cnullify_remote ( const pastix_data_t *  pastix_data,
pastix_complex32_t *  y 
)

Set to 0 remote coefficients.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1354 of file bvec_ccompute.c.

References solver_cblk_s::cblktype.

Referenced by bcsc_cspmv().

◆ bvec_callreduce()

void bvec_callreduce ( const pastix_data_t *  pastix_data,
pastix_complex32_t *  y 
)

Apply an all reduce of the vector on all nodes.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1406 of file bvec_ccompute.c.

Referenced by bcsc_cspmv().

◆ bvec_saxpy_seq()

void bvec_saxpy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
float  alpha,
const float *  x,
float *  y 
)

Compute y <- alpha * x + y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...). -*
[in]nThe size of the vectors.
[in]alphaA scalar.
[in]xThe vector x.
[in,out]yThe vector y.

Definition at line 387 of file bvec_scompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by s_refine_init().

◆ bvec_saxpy_smp()

void bvec_saxpy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
float  alpha,
const float *  x,
float *  y 
)

Perform y = alpha * x + y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]alphaThe scalar to scale x
[in]xThe vector to be scaled
[in,out]yThe resulting solution

Definition at line 502 of file bvec_scompute.c.

References pthread_bvec_saxpy().

Referenced by s_refine_init().

◆ bvec_scopy_seq()

void bvec_scopy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const float *  x,
float *  y 
)

Copy a vector y = x (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 995 of file bvec_scompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by s_refine_init().

◆ bvec_scopy_smp()

void bvec_scopy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const float *  x,
float *  y 
)

Copy a vector y = x (parallel version)

   Initialise argument for the parallel function
Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 1096 of file bvec_scompute.c.

References pthread_bvec_scopy().

Referenced by s_refine_init().

◆ bvec_sdot_seq()

float bvec_sdot_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const float *  x,
const float *  y 
)

Compute the scalar product x.y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]xThe vector x.
[in]yThe vector y.
[in]nThe size of the vectors.
Return values
thescalar product of x and y.

Definition at line 705 of file bvec_scompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by s_refine_init().

◆ bvec_sdot_smp()

float bvec_sdot_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const float *  x,
const float *  y 
)

Compute a regular scalar product x.y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x, y and r
[in]xThe first vector of the scalar product
[in]yThe second vector of the scalar product
[out]rThe result of the scalar product
Returns
The allocated vector

Definition at line 826 of file bvec_scompute.c.

References pthread_bvec_sdot().

Referenced by s_refine_init().

◆ bvec_sgemv_seq()

void bvec_sgemv_seq ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
float  alpha,
const float *  A,
pastix_int_t  lda,
const float *  x,
float  beta,
float *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1171 of file bvec_scompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by s_refine_init().

◆ bvec_sgemv_smp()

void bvec_sgemv_smp ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
float  alpha,
const float *  A,
pastix_int_t  lda,
const float *  x,
float  beta,
float *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1320 of file bvec_scompute.c.

References pthread_bvec_sgemv().

Referenced by s_refine_init().

◆ bvec_snrm2_seq()

float bvec_snrm2_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const float *  x 
)

Compute the norm 2 of a vector. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]xThe vector x of size n.
Return values
thenorm 2 of x.

Definition at line 70 of file bvec_scompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by s_refine_init().

◆ bvec_snrm2_smp()

float bvec_snrm2_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const float *  x 
)

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]xThe vector which norm2 is to be computed
[in]nThe number of elements of x
Returns
The norm 2 of the vector

Definition at line 214 of file bvec_scompute.c.

References pthread_bvec_snrm2().

Referenced by s_refine_init().

◆ bvec_sscal_seq()

void bvec_sscal_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
float  alpha,
float *  x 
)

Scale a vector by the scalar alpha. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]alphaThe scalar to scale the vector x.
[in,out]xThe vector x to scale.

Definition at line 248 of file bvec_scompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by s_refine_init().

◆ bvec_sscal_smp()

void bvec_sscal_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
float  alpha,
float *  x 
)

Scale a vector (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of the vector
[in]alphaThe scaling parameter
[in,out]xThe vector to be scaled

Definition at line 351 of file bvec_scompute.c.

References pthread_bvec_sscal().

Referenced by s_refine_init().

◆ bvec_slapmr()

int bvec_slapmr ( int  thread_safe,
pastix_dir_t  dir,
pastix_int_t  m,
pastix_int_t  n,
float *  A,
pastix_int_t  lda,
pastix_int_t *  perm 
)

Apply a row permutation to a matrix A (LAPACK xlatmr)

Parameters
[in]thread_safeBoolean to switch between the thread-safe implementation that exploits an additional workspace, or the non thread-safe version that has no memory overhead.
[in]mThe number of rows in the matrix A, and the number of elements in perm.
[in]nThe number of columns in the matrix A.
[in,out]AA matrix of size lda-by-n. On exit, rowas are permuted and A contains P A.
[in]ldaThe leading dimension of A.
[in,out]permThe permutation array. Must be 0 based. If thread_safe is true, then perm array is used only as input, and a temporary array is allocated to follow the cycles. If thread_safe is false, then perm array is modified during the swap and restored at the end of the call.
Return values
PASTIX_SUCCESS

Definition at line 878 of file bvec_scompute.c.

References PASTIX_SUCCESS, and PastixDirBackward.

◆ bcsc_snorm()

float bcsc_snorm ( pastix_normtype_t  ntype,
const pastix_bcsc_t bcsc 
)

Compute the norm of an bcsc matrix.

Parameters
[in]ntype= PastixMaxNorm: Max norm = PastixOneNorm: One norm = PastixInfNorm: Infinity norm = PastixFrobeniusNorm: Frobenius norm
[in]bcscThe bcsc structure describing the matrix.
Return values
Thenorm of the matrix.

Definition at line 252 of file bcsc_snorm.c.

References bcsc_snorm_frobenius(), bcsc_snorm_inf(), bcsc_snorm_max(), bcsc_snorm_one(), PastixFrobeniusNorm, PastixInfNorm, PastixMaxNorm, and PastixOneNorm.

◆ bcsc_sspsv()

void bcsc_sspsv ( pastix_data_t *  pastix_data,
float *  b 
)

Solve A x = b with A the sparse matrix.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[in,out]dOn entry, the right hand side On exit, the solution of tha problem A x = b

Definition at line 1122 of file bvec_scompute.c.

References IPARM_VERBOSE, and pastix_subtask_solve().

Referenced by s_refine_init().

◆ bcsc_sspmv()

void bcsc_sspmv ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
float  alpha,
const float *  x,
float  beta,
float *  y 
)

Compute the matrix-vector product y = alpha * op(A) * x + beta * y.

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars. The op function is specified by the trans parameter and performs the operation as follows: trans = PastixNoTrans y := alpha*A x + beta*y trans = PastixTrans y := alpha*A' *x + beta*y trans = PastixTrans y := alpha(A')*x + beta*y

This function is used only in testings.

Parameters
[in]pastix_dataProvide information about bcsc, and select the scheduling version based on iparm[IPARM_SCHEDULER].
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 626 of file bcsc_sspmv.c.

References bcsc_sspmv_seq(), bcsc_sspmv_smp(), bvec_sallreduce(), bvec_snullify_remote(), IPARM_SCHEDULER, IPARM_TRANSPOSE_SOLVE, PastixNoTrans, PastixSchedDynamic, and PastixSchedStatic.

Referenced by s_refine_init().

◆ bcsc_sspmv_seq()

void bcsc_sspmv_seq ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
float  alpha,
const float *  x,
float  beta,
float *  y 
)

Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version)

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars.

Parameters
[in]pastix_dataProvide information about bcsc
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 244 of file bcsc_sspmv.c.

References pastix_bcsc_s::cscfnbr.

Referenced by bcsc_sspmv().

◆ bcsc_sspmv_smp()

void bcsc_sspmv_smp ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
float  alpha,
const float *  x,
float  beta,
float *  y 
)

Perform y = alpha A x + beta y (Parallel version)

This functions is parallelized through the internal static scheduler.

Parameters
[in]pastix_dataThe pastix_data structure that holds the A matrix.
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixTrans: A is conjugate transposed.
[in]alphaThe scalar alpha.
[in]xThe vector x
[in]betaThe scalar beta.
[in,out]yOn entry, the vector y On exit, alpha A x + y

Definition at line 549 of file bcsc_sspmv.c.

References bcsc_sspmv_get_balanced_indexes(), pthread_bcsc_sspmv(), and pthread_bcsc_sspmv_tasktab().

Referenced by bcsc_sspmv().

◆ bvec_snullify_remote()

void bvec_snullify_remote ( const pastix_data_t *  pastix_data,
float *  y 
)

Set to 0 remote coefficients.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1354 of file bvec_scompute.c.

References solver_cblk_s::cblktype.

Referenced by bcsc_sspmv().

◆ bvec_sallreduce()

void bvec_sallreduce ( const pastix_data_t *  pastix_data,
float *  y 
)

Apply an all reduce of the vector on all nodes.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1406 of file bvec_scompute.c.

Referenced by bcsc_sspmv().

◆ bvec_zaxpy_seq()

void bvec_zaxpy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex64_t  alpha,
const pastix_complex64_t *  x,
pastix_complex64_t *  y 
)

Compute y <- alpha * x + y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...). -*
[in]nThe size of the vectors.
[in]alphaA scalar.
[in]xThe vector x.
[in,out]yThe vector y.

Definition at line 387 of file bvec_zcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by z_refine_init().

◆ bvec_zaxpy_smp()

void bvec_zaxpy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex64_t  alpha,
const pastix_complex64_t *  x,
pastix_complex64_t *  y 
)

Perform y = alpha * x + y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]alphaThe scalar to scale x
[in]xThe vector to be scaled
[in,out]yThe resulting solution

Definition at line 502 of file bvec_zcompute.c.

References pthread_bvec_zaxpy().

Referenced by z_refine_init().

◆ bvec_zcopy_seq()

void bvec_zcopy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex64_t *  x,
pastix_complex64_t *  y 
)

Copy a vector y = x (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 995 of file bvec_zcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by z_refine_init().

◆ bvec_zcopy_smp()

void bvec_zcopy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex64_t *  x,
pastix_complex64_t *  y 
)

Copy a vector y = x (parallel version)

   Initialise argument for the parallel function
Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 1096 of file bvec_zcompute.c.

References pthread_bvec_zcopy().

Referenced by z_refine_init().

◆ bvec_zdotu_seq()

pastix_complex64_t bvec_zdotu_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex64_t *  x,
const pastix_complex64_t *  y 
)

Compute the scalar product x.y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]xThe vector x.
[in]yThe vector y.
[in]nThe size of the vectors.
Return values
thescalar product of x and y.

Definition at line 705 of file bvec_zcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

◆ bvec_zdotu_smp()

pastix_complex64_t bvec_zdotu_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex64_t *  x,
const pastix_complex64_t *  y 
)

Compute a regular scalar product x.y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x, y and r
[in]xThe first vector of the scalar product
[in]yThe second vector of the scalar product
[out]rThe result of the scalar product
Returns
The allocated vector

Definition at line 826 of file bvec_zcompute.c.

References pthread_bvec_zdotu().

◆ bvec_zgemv_seq()

void bvec_zgemv_seq ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
pastix_complex64_t  alpha,
const pastix_complex64_t *  A,
pastix_int_t  lda,
const pastix_complex64_t *  x,
pastix_complex64_t  beta,
pastix_complex64_t *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1171 of file bvec_zcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by z_refine_init().

◆ bvec_zgemv_smp()

void bvec_zgemv_smp ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
pastix_complex64_t  alpha,
const pastix_complex64_t *  A,
pastix_int_t  lda,
const pastix_complex64_t *  x,
pastix_complex64_t  beta,
pastix_complex64_t *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1320 of file bvec_zcompute.c.

References pthread_bvec_zgemv().

Referenced by z_refine_init().

◆ bvec_znrm2_seq()

double bvec_znrm2_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex64_t *  x 
)

Compute the norm 2 of a vector. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]xThe vector x of size n.
Return values
thenorm 2 of x.

Definition at line 70 of file bvec_zcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by z_refine_init().

◆ bvec_znrm2_smp()

double bvec_znrm2_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const pastix_complex64_t *  x 
)

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]xThe vector which norm2 is to be computed
[in]nThe number of elements of x
Returns
The norm 2 of the vector

Definition at line 214 of file bvec_zcompute.c.

References pthread_bvec_znrm2().

Referenced by z_refine_init().

◆ bvec_zscal_seq()

void bvec_zscal_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex64_t  alpha,
pastix_complex64_t *  x 
)

Scale a vector by the scalar alpha. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]alphaThe scalar to scale the vector x.
[in,out]xThe vector x to scale.

Definition at line 248 of file bvec_zcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by z_refine_init().

◆ bvec_zscal_smp()

void bvec_zscal_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
pastix_complex64_t  alpha,
pastix_complex64_t *  x 
)

Scale a vector (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of the vector
[in]alphaThe scaling parameter
[in,out]xThe vector to be scaled

Definition at line 351 of file bvec_zcompute.c.

References pthread_bvec_zscal().

Referenced by z_refine_init().

◆ bvec_zlapmr()

int bvec_zlapmr ( int  thread_safe,
pastix_dir_t  dir,
pastix_int_t  m,
pastix_int_t  n,
pastix_complex64_t *  A,
pastix_int_t  lda,
pastix_int_t *  perm 
)

Apply a row permutation to a matrix A (LAPACK xlatmr)

Parameters
[in]thread_safeBoolean to switch between the thread-safe implementation that exploits an additional workspace, or the non thread-safe version that has no memory overhead.
[in]mThe number of rows in the matrix A, and the number of elements in perm.
[in]nThe number of columns in the matrix A.
[in,out]AA matrix of size lda-by-n. On exit, rowas are permuted and A contains P A.
[in]ldaThe leading dimension of A.
[in,out]permThe permutation array. Must be 0 based. If thread_safe is true, then perm array is used only as input, and a temporary array is allocated to follow the cycles. If thread_safe is false, then perm array is modified during the swap and restored at the end of the call.
Return values
PASTIX_SUCCESS

Definition at line 878 of file bvec_zcompute.c.

References PASTIX_SUCCESS, and PastixDirBackward.

◆ bcsc_znorm()

double bcsc_znorm ( pastix_normtype_t  ntype,
const pastix_bcsc_t bcsc 
)

Compute the norm of an bcsc matrix.

Parameters
[in]ntype= PastixMaxNorm: Max norm = PastixOneNorm: One norm = PastixInfNorm: Infinity norm = PastixFrobeniusNorm: Frobenius norm
[in]bcscThe bcsc structure describing the matrix.
Return values
Thenorm of the matrix.

Definition at line 252 of file bcsc_znorm.c.

References bcsc_znorm_frobenius(), bcsc_znorm_inf(), bcsc_znorm_max(), bcsc_znorm_one(), PastixFrobeniusNorm, PastixInfNorm, PastixMaxNorm, and PastixOneNorm.

◆ bcsc_zspsv()

void bcsc_zspsv ( pastix_data_t *  pastix_data,
pastix_complex64_t *  b 
)

Solve A x = b with A the sparse matrix.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[in,out]dOn entry, the right hand side On exit, the solution of tha problem A x = b

Definition at line 1122 of file bvec_zcompute.c.

References IPARM_VERBOSE, and pastix_subtask_solve().

Referenced by z_refine_init().

◆ bcsc_zspmv()

void bcsc_zspmv ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
pastix_complex64_t  alpha,
const pastix_complex64_t *  x,
pastix_complex64_t  beta,
pastix_complex64_t *  y 
)

Compute the matrix-vector product y = alpha * op(A) * x + beta * y.

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars. The op function is specified by the trans parameter and performs the operation as follows: trans = PastixNoTrans y := alpha*A *x + beta*y trans = PastixTrans y := alpha*A' *x + beta*y trans = PastixConjTrans y := alpha*conj(A')*x + beta*y

This function is used only in testings.

Parameters
[in]pastix_dataProvide information about bcsc, and select the scheduling version based on iparm[IPARM_SCHEDULER].
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixConjTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 626 of file bcsc_zspmv.c.

References bcsc_zspmv_seq(), bcsc_zspmv_smp(), bvec_zallreduce(), bvec_znullify_remote(), IPARM_SCHEDULER, IPARM_TRANSPOSE_SOLVE, PastixNoTrans, PastixSchedDynamic, and PastixSchedStatic.

Referenced by z_refine_init().

◆ bcsc_zspmv_seq()

void bcsc_zspmv_seq ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
pastix_complex64_t  alpha,
const pastix_complex64_t *  x,
pastix_complex64_t  beta,
pastix_complex64_t *  y 
)

Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version)

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars.

Parameters
[in]pastix_dataProvide information about bcsc
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixConjTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 244 of file bcsc_zspmv.c.

References pastix_bcsc_s::cscfnbr.

Referenced by bcsc_zspmv().

◆ bcsc_zspmv_smp()

void bcsc_zspmv_smp ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
pastix_complex64_t  alpha,
const pastix_complex64_t *  x,
pastix_complex64_t  beta,
pastix_complex64_t *  y 
)

Perform y = alpha A x + beta y (Parallel version)

This functions is parallelized through the internal static scheduler.

Parameters
[in]pastix_dataThe pastix_data structure that holds the A matrix.
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixConjTrans: A is conjugate transposed.
[in]alphaThe scalar alpha.
[in]xThe vector x
[in]betaThe scalar beta.
[in,out]yOn entry, the vector y On exit, alpha A x + y

Definition at line 549 of file bcsc_zspmv.c.

References bcsc_zspmv_get_balanced_indexes(), pthread_bcsc_zspmv(), and pthread_bcsc_zspmv_tasktab().

Referenced by bcsc_zspmv().

◆ bvec_znullify_remote()

void bvec_znullify_remote ( const pastix_data_t *  pastix_data,
pastix_complex64_t *  y 
)

Set to 0 remote coefficients.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1354 of file bvec_zcompute.c.

References solver_cblk_s::cblktype.

Referenced by bcsc_zspmv().

◆ bvec_zallreduce()

void bvec_zallreduce ( const pastix_data_t *  pastix_data,
pastix_complex64_t *  y 
)

Apply an all reduce of the vector on all nodes.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1406 of file bvec_zcompute.c.

Referenced by bcsc_zspmv().

◆ bvec_daxpy_seq()

void bvec_daxpy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
double  alpha,
const double *  x,
double *  y 
)

Compute y <- alpha * x + y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...). -*
[in]nThe size of the vectors.
[in]alphaA scalar.
[in]xThe vector x.
[in,out]yThe vector y.

Definition at line 387 of file bvec_dcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by d_refine_init().

◆ bvec_daxpy_smp()

void bvec_daxpy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
double  alpha,
const double *  x,
double *  y 
)

Perform y = alpha * x + y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]alphaThe scalar to scale x
[in]xThe vector to be scaled
[in,out]yThe resulting solution

Definition at line 502 of file bvec_dcompute.c.

References pthread_bvec_daxpy().

Referenced by d_refine_init().

◆ bvec_dcopy_seq()

void bvec_dcopy_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const double *  x,
double *  y 
)

Copy a vector y = x (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 995 of file bvec_dcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by d_refine_init().

◆ bvec_dcopy_smp()

void bvec_dcopy_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const double *  x,
double *  y 
)

Copy a vector y = x (parallel version)

   Initialise argument for the parallel function
Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x and y
[in]xThe vector to be copied
[in,out]yThe vector copy of x

Definition at line 1096 of file bvec_dcompute.c.

References pthread_bvec_dcopy().

Referenced by d_refine_init().

◆ bvec_ddot_seq()

double bvec_ddot_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const double *  x,
const double *  y 
)

Compute the scalar product x.y. (Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]xThe vector x.
[in]yThe vector y.
[in]nThe size of the vectors.
Return values
thescalar product of x and y.

Definition at line 705 of file bvec_dcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by d_refine_init().

◆ bvec_ddot_smp()

double bvec_ddot_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const double *  x,
const double *  y 
)

Compute a regular scalar product x.y (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of vectors x, y and r
[in]xThe first vector of the scalar product
[in]yThe second vector of the scalar product
[out]rThe result of the scalar product
Returns
The allocated vector

Definition at line 826 of file bvec_dcompute.c.

References pthread_bvec_ddot().

Referenced by d_refine_init().

◆ bvec_dgemv_seq()

void bvec_dgemv_seq ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
double  alpha,
const double *  A,
pastix_int_t  lda,
const double *  x,
double  beta,
double *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Sequential version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1171 of file bvec_dcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by d_refine_init().

◆ bvec_dgemv_smp()

void bvec_dgemv_smp ( pastix_data_t *  pastix_data,
pastix_int_t  m,
pastix_int_t  n,
double  alpha,
const double *  A,
pastix_int_t  lda,
const double *  x,
double  beta,
double *  y 
)

Compute.

\[ y = \alpha A x + \beta y \]

(Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]mThe number of rows of the matrix A, and the size of y.
[in]nThe number of columns of the matrix A, and the size of x.
[in]alphaThe scalar alpha.
[in]AThe dense matrix A of size lda-by-n.
[in]ldaThe leading dimension of the matrix A. lda >= max(1,m)
[in]xThe vector x of size n.
[in]betaThe scalar beta.
[in,out]yOn entry, the initial vector y of size m. On exit, the updated vector.

Definition at line 1320 of file bvec_dcompute.c.

References pthread_bvec_dgemv().

Referenced by d_refine_init().

◆ bvec_dnrm2_seq()

double bvec_dnrm2_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const double *  x 
)

Compute the norm 2 of a vector. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]xThe vector x of size n.
Return values
thenorm 2 of x.

Definition at line 70 of file bvec_dcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by d_refine_init().

◆ bvec_dnrm2_smp()

double bvec_dnrm2_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
const double *  x 
)

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]xThe vector which norm2 is to be computed
[in]nThe number of elements of x
Returns
The norm 2 of the vector

Definition at line 214 of file bvec_dcompute.c.

References pthread_bvec_dnrm2().

Referenced by d_refine_init().

◆ bvec_dscal_seq()

void bvec_dscal_seq ( pastix_data_t *  pastix_data,
pastix_int_t  n,
double  alpha,
double *  x 
)

Scale a vector by the scalar alpha. (Sequential version)

Parameters
[in]pastix_dataProvide information to the parallel version, to know the global context (Number of thread, barrier, ...).
[in]nThe size of the vector x.
[in]alphaThe scalar to scale the vector x.
[in,out]xThe vector x to scale.

Definition at line 248 of file bvec_dcompute.c.

References cblk_colnbr(), bcsc_cblk_s::cblknum, pastix_bcsc_s::cscfnbr, pastix_bcsc_s::cscftab, and solver_cblk_s::lcolidx.

Referenced by d_refine_init().

◆ bvec_dscal_smp()

void bvec_dscal_smp ( pastix_data_t *  pastix_data,
pastix_int_t  n,
double  alpha,
double *  x 
)

Scale a vector (Parallel version)

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in]nThe number of elements of the vector
[in]alphaThe scaling parameter
[in,out]xThe vector to be scaled

Definition at line 351 of file bvec_dcompute.c.

References pthread_bvec_dscal().

Referenced by d_refine_init().

◆ bvec_dlapmr()

int bvec_dlapmr ( int  thread_safe,
pastix_dir_t  dir,
pastix_int_t  m,
pastix_int_t  n,
double *  A,
pastix_int_t  lda,
pastix_int_t *  perm 
)

Apply a row permutation to a matrix A (LAPACK xlatmr)

Parameters
[in]thread_safeBoolean to switch between the thread-safe implementation that exploits an additional workspace, or the non thread-safe version that has no memory overhead.
[in]mThe number of rows in the matrix A, and the number of elements in perm.
[in]nThe number of columns in the matrix A.
[in,out]AA matrix of size lda-by-n. On exit, rowas are permuted and A contains P A.
[in]ldaThe leading dimension of A.
[in,out]permThe permutation array. Must be 0 based. If thread_safe is true, then perm array is used only as input, and a temporary array is allocated to follow the cycles. If thread_safe is false, then perm array is modified during the swap and restored at the end of the call.
Return values
PASTIX_SUCCESS

Definition at line 878 of file bvec_dcompute.c.

References PASTIX_SUCCESS, and PastixDirBackward.

◆ bcsc_dnorm()

double bcsc_dnorm ( pastix_normtype_t  ntype,
const pastix_bcsc_t bcsc 
)

Compute the norm of an bcsc matrix.

Parameters
[in]ntype= PastixMaxNorm: Max norm = PastixOneNorm: One norm = PastixInfNorm: Infinity norm = PastixFrobeniusNorm: Frobenius norm
[in]bcscThe bcsc structure describing the matrix.
Return values
Thenorm of the matrix.

Definition at line 252 of file bcsc_dnorm.c.

References bcsc_dnorm_frobenius(), bcsc_dnorm_inf(), bcsc_dnorm_max(), bcsc_dnorm_one(), PastixFrobeniusNorm, PastixInfNorm, PastixMaxNorm, and PastixOneNorm.

◆ bcsc_dspsv()

void bcsc_dspsv ( pastix_data_t *  pastix_data,
double *  b 
)

Solve A x = b with A the sparse matrix.

Parameters
[in]pastix_dataThe PaStiX data structure that describes the solver instance.
[in,out]dOn entry, the right hand side On exit, the solution of tha problem A x = b

Definition at line 1122 of file bvec_dcompute.c.

References IPARM_VERBOSE, and pastix_subtask_solve().

Referenced by d_refine_init().

◆ bcsc_dspmv()

void bcsc_dspmv ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
double  alpha,
const double *  x,
double  beta,
double *  y 
)

Compute the matrix-vector product y = alpha * op(A) * x + beta * y.

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars. The op function is specified by the trans parameter and performs the operation as follows: trans = PastixNoTrans y := alpha*A x + beta*y trans = PastixTrans y := alpha*A' *x + beta*y trans = PastixTrans y := alpha(A')*x + beta*y

This function is used only in testings.

Parameters
[in]pastix_dataProvide information about bcsc, and select the scheduling version based on iparm[IPARM_SCHEDULER].
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 626 of file bcsc_dspmv.c.

References bcsc_dspmv_seq(), bcsc_dspmv_smp(), bvec_dallreduce(), bvec_dnullify_remote(), IPARM_SCHEDULER, IPARM_TRANSPOSE_SOLVE, PastixNoTrans, PastixSchedDynamic, and PastixSchedStatic.

Referenced by d_refine_init().

◆ bcsc_dspmv_seq()

void bcsc_dspmv_seq ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
double  alpha,
const double *  x,
double  beta,
double *  y 
)

Compute the matrix-vector product y = alpha * A * x + beta * y (Sequential version)

Where A is given in the bcsc format, x and y are two vectors of size n, and alpha and beta are two scalars.

Parameters
[in]pastix_dataProvide information about bcsc
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixTrans: A is conjugate transposed.
[in]alphaalpha specifies the scalar alpha
[in]xThe vector x.
[in]betabeta specifies the scalar beta
[in,out]yThe vector y.

Definition at line 244 of file bcsc_dspmv.c.

References pastix_bcsc_s::cscfnbr.

Referenced by bcsc_dspmv().

◆ bcsc_dspmv_smp()

void bcsc_dspmv_smp ( const pastix_data_t *  pastix_data,
pastix_trans_t  trans,
double  alpha,
const double *  x,
double  beta,
double *  y 
)

Perform y = alpha A x + beta y (Parallel version)

This functions is parallelized through the internal static scheduler.

Parameters
[in]pastix_dataThe pastix_data structure that holds the A matrix.
[in]transSpecifies whether the matrix A from the bcsc is transposed, not transposed or conjugate transposed: = PastixNoTrans: A is not transposed; = PastixTrans: A is transposed; = PastixTrans: A is conjugate transposed.
[in]alphaThe scalar alpha.
[in]xThe vector x
[in]betaThe scalar beta.
[in,out]yOn entry, the vector y On exit, alpha A x + y

Definition at line 549 of file bcsc_dspmv.c.

References bcsc_dspmv_get_balanced_indexes(), pthread_bcsc_dspmv(), and pthread_bcsc_dspmv_tasktab().

Referenced by bcsc_dspmv().

◆ bvec_dnullify_remote()

void bvec_dnullify_remote ( const pastix_data_t *  pastix_data,
double *  y 
)

Set to 0 remote coefficients.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1354 of file bvec_dcompute.c.

References solver_cblk_s::cblktype.

Referenced by bcsc_dspmv().

◆ bvec_dallreduce()

void bvec_dallreduce ( const pastix_data_t *  pastix_data,
double *  y 
)

Apply an all reduce of the vector on all nodes.

Parameters
[in]pastix_dataThe information about sequential and parallel version (Number of thread, ...).
[in,out]yOn entry, the initial vector y of size m. On exit, the y vector with remote section set to 0.

Definition at line 1406 of file bvec_dcompute.c.

Referenced by bcsc_dspmv().

◆ pthread_bvec_cnrm2()

static void pthread_bvec_cnrm2 ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]ctxThe context of the current thread
[in,out]argsThe parameter that providenumber of elements of x, and the vector which norm2 is to be computed, and the norm value

Definition at line 145 of file bvec_ccompute.c.

Referenced by bvec_cnrm2_smp().

◆ pthread_bvec_cscal()

static void pthread_bvec_cscal ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Scale a vector (Parallel version)

Parameters
[in]ctxThe information about number of thread and rank of the actual thread
[in,out]argsThe argument providing number of elements of the vector, the scaling parameter and, and the vector to be scaled

Definition at line 299 of file bvec_ccompute.c.

Referenced by bvec_cscal_smp().

◆ pthread_bvec_snrm2()

static void pthread_bvec_snrm2 ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]ctxThe context of the current thread
[in,out]argsThe parameter that providenumber of elements of x, and the vector which norm2 is to be computed, and the norm value

Definition at line 145 of file bvec_scompute.c.

Referenced by bvec_snrm2_smp().

◆ pthread_bvec_sscal()

static void pthread_bvec_sscal ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Scale a vector (Parallel version)

Parameters
[in]ctxThe information about number of thread and rank of the actual thread
[in,out]argsThe argument providing number of elements of the vector, the scaling parameter and, and the vector to be scaled

Definition at line 299 of file bvec_scompute.c.

Referenced by bvec_sscal_smp().

◆ pthread_bvec_znrm2()

static void pthread_bvec_znrm2 ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]ctxThe context of the current thread
[in,out]argsThe parameter that providenumber of elements of x, and the vector which norm2 is to be computed, and the norm value

Definition at line 145 of file bvec_zcompute.c.

Referenced by bvec_znrm2_smp().

◆ pthread_bvec_zscal()

static void pthread_bvec_zscal ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Scale a vector (Parallel version)

Parameters
[in]ctxThe information about number of thread and rank of the actual thread
[in,out]argsThe argument providing number of elements of the vector, the scaling parameter and, and the vector to be scaled

Definition at line 299 of file bvec_zcompute.c.

Referenced by bvec_zscal_smp().

◆ pthread_bvec_dnrm2()

static void pthread_bvec_dnrm2 ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Compute the norm 2 of a vector. (Parallel version)

Parameters
[in]ctxThe context of the current thread
[in,out]argsThe parameter that providenumber of elements of x, and the vector which norm2 is to be computed, and the norm value

Definition at line 145 of file bvec_dcompute.c.

Referenced by bvec_dnrm2_smp().

◆ pthread_bvec_dscal()

static void pthread_bvec_dscal ( isched_thread_t *  ctx,
void *  args 
)
inlinestatic

Scale a vector (Parallel version)

Parameters
[in]ctxThe information about number of thread and rank of the actual thread
[in,out]argsThe argument providing number of elements of the vector, the scaling parameter and, and the vector to be scaled

Definition at line 299 of file bvec_dcompute.c.

Referenced by bvec_dscal_smp().