SpM Handbook 1.2.4
|
#include "common.h"
#include <lapacke.h>
#include <cblas.h>
Go to the source code of this file.
Functions | |
int | spm_cspmm (spm_side_t side, spm_trans_t transA, spm_trans_t transB, spm_int_t K, spm_complex32_t alpha, const spmatrix_t *A, const spm_complex32_t *B, spm_int_t ldb, spm_complex32_t beta, spm_complex32_t *C, spm_int_t ldc) |
Compute a matrix-matrix product. | |
int | spm_cspmv (spm_trans_t trans, spm_complex32_t alpha, const spmatrix_t *A, const spm_complex32_t *x, spm_int_t incx, spm_complex32_t beta, spm_complex32_t *y, spm_int_t incy) |
compute the matrix-vector product: | |
#define | LAPACKE_clascl_work(_dir_, _uplo_, _kl_, _ku_, _cfrom_, _cto_, _m_, _n_, _A_, _lda_) __spm_clascl( (_cto_), (_m_), (_n_), (_A_), (_lda_) ) |
Alias if Lapacke zlscl is not available. | |
typedef struct __spm_cmatvec_s | __spm_cmatvec_t |
Typedef associated to structure. | |
typedef spm_complex32_t(* | __conj_fct_t) (spm_complex32_t) |
Typedef to define the op function applied to the element (id or conjf) | |
typedef int(* | __loop_fct_t) (const __spm_cmatvec_t *) |
Typedef to the main loop function performing the matvec operation. | |
static spm_complex32_t | __fct_id (spm_complex32_t val) |
Identity function. | |
static void | c_spmm_build_Ctmp (int nrhs, const spmatrix_t *spm, const spm_complex32_t *Cloc, spm_int_t ldcl, spm_complex32_t **Cglb, spm_int_t *ldcg) |
Build a global C RHS, set to 0 for remote datas. | |
static void | c_spmm_build_Btmp (int nrhs, const spmatrix_t *spm, const spm_complex32_t *Bloc, spm_int_t ldbl, spm_complex32_t **Bglb, spm_int_t *ldbg) |
Build a global B vector by gathering datas from all nodes. | |
SParse Matrix package matrix-vector multiplication routines.
Definition in file c_spm_matrixvector.c.
#define LAPACKE_clascl_work | ( | _dir_, | |
_uplo_, | |||
_kl_, | |||
_ku_, | |||
_cfrom_, | |||
_cto_, | |||
_m_, | |||
_n_, | |||
_A_, | |||
_lda_ | |||
) | __spm_clascl( (_cto_), (_m_), (_n_), (_A_), (_lda_) ) |
Alias if Lapacke zlscl is not available.
[in] | _dir_ | Unused parameter |
[in] | _uplo_ | Unused parameter |
[in] | _kl_ | Unused parameter |
[in] | _ku_ | Unused parameter |
[in] | _cfrom_ | Unused parameter |
[in] | _cto_ | The scaling factor of the matrix A |
[in] | _m_ | The number of rows of the matrix A |
[in] | _n_ | The number of columns of the matrix A |
[in,out] | _A_ | On entry the lda-by-n matrix to scale. On exit, the matrix is multiplied by cto. |
[in] | _lda_ | The leading dimension of the matrix A. lda >= max(1, m) |
Definition at line 737 of file c_spm_matrixvector.c.
typedef struct __spm_cmatvec_s __spm_cmatvec_t |
Typedef associated to structure.
Definition at line 35 of file c_spm_matrixvector.c.
typedef spm_complex32_t(* __conj_fct_t) (spm_complex32_t) |
Typedef to define the op function applied to the element (id or conjf)
Definition at line 40 of file c_spm_matrixvector.c.
typedef int(* __loop_fct_t) (const __spm_cmatvec_t *) |
Typedef to the main loop function performing the matvec operation.
Definition at line 45 of file c_spm_matrixvector.c.
|
static |
Identity function.
[in] | val | TODO |
Definition at line 62 of file c_spm_matrixvector.c.
|
static |
Build a global C RHS, set to 0 for remote datas.
[in] | nrhs | The number of RHS. |
[in] | spm | The pointer to the sparse matrix structure. |
[in] | Cloc | The local matrix of size ldcl -by- nrhs |
[in] | ldcl | The leading dimension of Cloc. ldcl >= max( 1, spm->nexp ) |
[out] | Cglb | On exit, contains the centralized version of the Cloc matrix. |
[out] | ldcg | On exit, contains the leading dimension of the Cglb matrix. ldcg >= max(1, spm->gNexp ) |
Definition at line 948 of file c_spm_matrixvector.c.
References spmatrix_s::baseval, spmatrix_s::dof, spmatrix_s::dofs, spmatrix_s::gNexp, spmatrix_s::loc2glob, and spmatrix_s::n.
Referenced by spm_cspmm(), and spm_cspmv().
|
static |
Build a global B vector by gathering datas from all nodes.
[in] | spm | The pointer to the sparse matrix structure. |
[in] | nrhs | The number of RHS. |
[in] | Bloc | The local B vector. |
[in,out] | ldbl | The leading dimension of the local B vector. |
[out] | Bglb | The global B vector. |
[out] | ldbg | The leading dimension of the global B vector. |
Definition at line 1012 of file c_spm_matrixvector.c.
References c_spmGatherRHS(), and spmatrix_s::gNexp.
Referenced by spm_cspmm(), and spm_cspmv().