SpM Handbook 1.2.4
|
#include "common.h"
Go to the source code of this file.
Functions | |
static spm_int_t | spm_compute_degrees_csx (const spmatrix_t *spm, spm_int_t *degrees) |
Compute the local degree of each vertex of an SPM in CSR/CSC format. | |
static spm_int_t | spm_compute_degrees_ijv (const spmatrix_t *spm, spm_int_t *degrees) |
Compute the degree of each vertex of an IJV matrix. | |
static spm_int_t | spm_compute_degrees (const spmatrix_t *spm, spm_int_t *degrees) |
Compute the degree of each vertex. | |
static void | spm_add_diag_csx (spmatrix_t *spm, spm_int_t diagval) |
Insert diagonal elements to the graph of a CSC/CSR matrix to have a full Laplacian generated. | |
static void | spm_add_diag_ijv (spmatrix_t *spm, spm_int_t diagval) |
Insert diagonal elements to the graph of an IJV matrix to have a full Laplacian generated. | |
static void | spm_add_diag (spmatrix_t *spm, spm_int_t diagval) |
Insert diagonal elements to the graph of a matrix to have a full Laplacian generated. | |
static void | spm_generate_fake_values (spmatrix_t *spm, const spm_int_t *degrees, double alpha, double beta) |
Generate the fake values array such that ![]() | |
SPM basic subroutines | |
void | spmGenFakeValues (spmatrix_t *spm) |
Generate the fake values array such that ![]() | |
SParse Matrix generic laplacian value generator routines.
Definition in file spm_gen_fake_values.c.
|
static |
Compute the local degree of each vertex of an SPM in CSR/CSC format.
[in] | spm | The spm to study in CSC/CSR format. |
[in,out] | degrees | Array of size spm->gN allocated and set to 0 on entry. On exit, contains the degree of each vertex in the spm matrix for the local node. |
Definition at line 41 of file spm_gen_fake_values.c.
References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::dof, spmatrix_s::dofs, spmatrix_s::fmttype, spmatrix_s::loc2glob, spmatrix_s::mtxtype, spmatrix_s::n, spmatrix_s::replicated, spmatrix_s::rowptr, SpmCSR, and SpmGeneral.
Referenced by spm_compute_degrees().
|
static |
Compute the degree of each vertex of an IJV matrix.
[in] | spm | The spm to study in IJV format. |
[in,out] | degrees | Array of size spm->gN allocated and set to 0 on entry. On exit, contains the degree of each vertex in the spm matrix for the local node. |
Definition at line 104 of file spm_gen_fake_values.c.
References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::dof, spmatrix_s::dofs, spmatrix_s::mtxtype, spmatrix_s::nnz, spmatrix_s::rowptr, and SpmGeneral.
Referenced by spm_compute_degrees().
|
static |
Compute the degree of each vertex.
[in] | spm | The spm to study. |
[in,out] | degrees | Array of size spm->n allocated on entry. On exit, contains the degree of each vertex in the spm matrix. |
Definition at line 156 of file spm_gen_fake_values.c.
References spmatrix_s::clustnbr, spmatrix_s::comm, spmatrix_s::fmttype, spmatrix_s::gN, spmatrix_s::loc2glob, spmatrix_s::replicated, spm_compute_degrees_csx(), spm_compute_degrees_ijv(), SPM_MPI_INT, and SpmIJV.
Referenced by spmGenFakeValues().
|
static |
Insert diagonal elements to the graph of a CSC/CSR matrix to have a full Laplacian generated.
[in,out] | spm | At start, the initial spm structure with missing diagonal elements. At exit, contains the same sparse matrix with diagonal elements added. |
[in] | diagval | The number of diagonal elements already present in the matrix. |
Definition at line 205 of file spm_gen_fake_values.c.
References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::fmttype, spmatrix_s::loc2glob, spmatrix_s::n, spmatrix_s::nnz, spmatrix_s::replicated, spmatrix_s::rowptr, and SpmCSC.
Referenced by spm_add_diag().
|
static |
Insert diagonal elements to the graph of an IJV matrix to have a full Laplacian generated.
[in,out] | spm | At start, the initial spm structure with missing diagonal elements. At exit, contains the same sparse matrix with diagonal elements added. |
[in] | diagval | The number of diagonal elements already present in the matrix. |
Definition at line 292 of file spm_gen_fake_values.c.
References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::loc2glob, spmatrix_s::n, spmatrix_s::nnz, spmatrix_s::replicated, and spmatrix_s::rowptr.
Referenced by spm_add_diag().
|
static |
Insert diagonal elements to the graph of a matrix to have a full Laplacian generated.
[in,out] | spm | At start, the initial spm structure with missing diagonal elements. At exit, contains the same sparse matrix with diagonal elements added. |
[in] | diagval | The number of diagonal elements already present in the matrix. |
Definition at line 365 of file spm_gen_fake_values.c.
References spmatrix_s::fmttype, spm_add_diag_csx(), spm_add_diag_ijv(), and SpmIJV.
Referenced by spmGenFakeValues().
|
static |
Generate the fake values array such that
D is the degree matrix, and A the adjacency matrix.
[in,out] | spm | The spm structure for which the values array must be generated. |
[in] | degrees | Array of size spm->n that contains the degree of each vertex in the spm structure. |
[in] | alpha | The scalar alpha. |
[in] | beta | The scalar beta. |
Definition at line 401 of file spm_gen_fake_values.c.
References spmatrix_s::baseval, spmatrix_s::colptr, spmatrix_s::dof, spmatrix_s::dofs, spmatrix_s::flttype, spmatrix_s::fmttype, spmatrix_s::loc2glob, spmatrix_s::mtxtype, spmatrix_s::n, spmatrix_s::nnz, spmatrix_s::nnzexp, spmatrix_s::replicated, spmatrix_s::rowptr, SpmCSC, SpmCSR, SpmDouble, SpmHermitian, SpmIJV, SpmSymmetric, and spmatrix_s::values.
Referenced by spmGenFakeValues().