SpM Handbook 1.2.4
|
#include "common.h"
Go to the source code of this file.
Functions | |
static int * | spm_gather_init (const spmatrix_t *spm) |
Initialize the gather structures. | |
static int | spm_gather_check (const spmatrix_t *spm, const int *allcounts) |
Check if a matrix has been scattered continuously or not. | |
static void | spm_gather_csx_update (const spmatrix_t *spm, spm_int_t *colptr, int *recvdispls, int *recvcounts) |
Update a gathered compressed array to shift the indices accordingly to the distribution. | |
static void | spm_gather_csx (const spmatrix_t *oldspm, spmatrix_t *newspm, int root, int *allcounts) |
Gather a distributed Sparse Matrix on the root node(s) in CSC/CSR format. | |
static void | spm_gather_ijv (const spmatrix_t *oldspm, spmatrix_t *newspm, int root, const int *allcounts) |
Gather a distributed Sparse Matrix on the root node(s) in IJV format. | |
int | spmGather (const spmatrix_t *oldspm, int root, spmatrix_t *newspm) |
Gather a distributed Sparse Matrix on a single node. | |
int | spmGatherInPlace (spmatrix_t *spm) |
This routine performs a allgather of a distributed spm in place. | |
SParse Matrix gather routine.
Definition in file spm_gather.c.
|
static |
Initialize the gather structures.
[in] | spm | The spm to gather. |
Definition at line 39 of file spm_gather.c.
References spmatrix_s::clustnbr, spmatrix_s::comm, spmatrix_s::n, spmatrix_s::nnz, and spmatrix_s::nnzexp.
Referenced by spmGather().
|
static |
Check if a matrix has been scattered continuously or not.
[in] | spm | The spm to gather. |
[in] | allcounts | The array of triplets { n, nnz, nnzexp } for all nodes. |
0 | if the matrix is not scattered continuously |
!0 | if the matrix is scattered continuously |
Definition at line 73 of file spm_gather.c.
References spmatrix_s::baseval, spmatrix_s::clustnum, spmatrix_s::comm, spmatrix_s::fmttype, spmatrix_s::loc2glob, spmatrix_s::n, and SpmIJV.
Referenced by spmGather().
|
static |
Update a gathered compressed array to shift the indices accordingly to the distribution.
[in] | spm | The original scattered spm |
[in] | colptr | The pointer to the gathered compressed array (spm->colptr, or spm->rowptr) of the new gathered spm. |
[in] | recvdispls | The array of reception displacements for the n values. |
[in] | recvcounts | The array of reception count in terms of nnz. |
Definition at line 125 of file spm_gather.c.
References spmatrix_s::clustnbr, spmatrix_s::gN, and spmatrix_s::gnnz.
Referenced by spm_gather_csx().
|
static |
Gather a distributed Sparse Matrix on the root node(s) in CSC/CSR format.
[in] | oldspm | The distributed sparse matrix to gather. |
[in] | newspm | The new gathered spm. NULL if not root. |
[in] | root | The root node that gather the final sparse matrix. If -1, all nodes gather a copy of the matrix. |
[in] | allcounts | The array of the triplets {n, nnz, nnzexp}. |
Definition at line 179 of file spm_gather.c.
References spmatrix_s::clustnbr, spmatrix_s::clustnum, spmatrix_s::colptr, spmatrix_s::comm, spmatrix_s::flttype, spmatrix_s::fmttype, spmatrix_s::n, spmatrix_s::nnz, spmatrix_s::nnzexp, spmatrix_s::rowptr, spm_gather_csx_update(), SPM_MPI_INT, SpmCSC, SpmPattern, and spmatrix_s::values.
Referenced by spmGather().
|
static |
Gather a distributed Sparse Matrix on the root node(s) in IJV format.
[in] | oldspm | The distributed sparse matrix to gather. |
[in] | newspm | The new gathered spm. NULL if not root. |
[in] | root | The root node that gather the final sparse matrix. If -1, all nodes gather a copy of the matrix. |
[in] | allcounts | The array of the triplets {n, nnz, nnzexp}. |
Definition at line 325 of file spm_gather.c.
References spmatrix_s::clustnbr, spmatrix_s::clustnum, spmatrix_s::colptr, spmatrix_s::comm, spmatrix_s::dof, spmatrix_s::flttype, spmatrix_s::nnz, spmatrix_s::nnzexp, spmatrix_s::rowptr, SPM_MPI_INT, SpmPattern, and spmatrix_s::values.
Referenced by spmGather().