PaStiX Handbook
6.3.2

#include "common.h"
#include "pastix/order.h"
#include <spm.h>
#include "blend/solver.h"
#include "bcsc/bcsc.h"
#include "bcsc/bcsc_z.h"
#include "bcsc/bcsc_c.h"
#include "bcsc/bcsc_d.h"
#include "bcsc/bcsc_s.h"
Go to the source code of this file.
Macros  
#define  BCSC_COMM_NBR 6 
Functions  
void  bcsc_handle_comm_init (const SolverMatrix *solvmtx, pastix_bcsc_t *bcsc) 
Initializes the bcsc_handle_comm_t structure. More...  
void  bcsc_handle_comm_exit (bcsc_handle_comm_t *bcsc_comm) 
Frees the bcsc_handle_comm pointers. More...  
pastix_int_t *  bcsc_init_col2cblk_shm (const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc) 
Creates the array which represents the repartition of each column in the block structure. The array size is spm>gNexp where: More...  
pastix_int_t *  bcsc_init_col2cblk (const SolverMatrix *solvmtx, const pastix_bcsc_t *bcsc, const spmatrix_t *spm) 
Creates the array which represents the repartition of each column in the block structure. This routine calls bcsc_init_col2cblk_shm or bcsc_init_col2cblk_dst according to the way the matrix is stored in the memory. More...  
static pastix_int_t *  bcsc_init_dofshift (const spmatrix_t *spm, const pastix_order_t *ord) 
Initializes the dofshit array of size gNexp which gives dofshift[index_permuted] = index. This corresponds to the inverse of the permutation given in ord>permtab. More...  
static void  bcsc_init_global_coltab_shm_cdof (const spmatrix_t *spm, const pastix_order_t *ord, pastix_int_t *globcol) 
Initializes the coltab of a block csc matrix. The coltab corresponds to the number of rows (expended) per column (non expended). This rountine is called when the matrix is stored in shared memory or the matrix is replicated on the processors and the matrix's degree of liberty is constant. More...  
static void  bcsc_init_global_coltab_shm_vdof (const spmatrix_t *spm, const pastix_order_t *ord, pastix_int_t *globcol) 
Initializes the coltab of a block csc matrix. The coltab corresponds to the number of rows (expended) per column (non expended). This rountine is called when the matrix is stored in shared memory or the matrix is replicated on the processors and the matrix's degree of liberty is variadic. More...  
static pastix_int_t *  bcsc_init_global_coltab (const spmatrix_t *spm, const pastix_order_t *ord, const SolverMatrix *solvmtx, const pastix_int_t *col2cblk, bcsc_handle_comm_t *bcsc_comm) 
Initializes the coltab of a block csc matrix. The coltab corresponds to the number of rows (expended) per column (non expended). This routine is calls bcsc_init_global_coltab_[shm,dst]_[c,v]dof according to the way the matrix is stored and if the degree of liberty of the matrix is constant or variadic. If the matrix is distributed in the memory, this function also calls the routines which exchange the amount of data for the communication, store the indexes and values to send and exchange the indexes. More...  
pastix_int_t  bcsc_init_coltab (const spmatrix_t *spm, const pastix_order_t *ord, const SolverMatrix *solvmtx, pastix_bcsc_t *bcsc) 
Initializes the coltab of a block csc matrix. The coltab corresponds to the number of rows (expended) per column (non expended). If the matrix is distributed in the memory, this function also calls the routines which exchange the amount of data for the communication, store the indexes and values to send and exchange the indexes. More...  
void  bcsc_restore_coltab (pastix_bcsc_t *bcsc) 
Restores the coltab array when it has been modified to initialize the row and values arrays. More...  
void  bcsc_init_struct (const spmatrix_t *spm, const SolverMatrix *solvmtx, pastix_bcsc_t *bcsc) 
Initializes a block csc. More...  
void  bcsc_exit_struct (pastix_bcsc_t *bcsc) 
Cleanup the bcsc struct. (symmetric of bcsc_init_struct) More...  
static void  bcsc_init (const spmatrix_t *spm, const pastix_order_t *ord, const SolverMatrix *solvmtx, pastix_int_t initAt, pastix_bcsc_t *bcsc) 
Initializes a block csc. More...  
double  bcscInit (const spmatrix_t *spm, const pastix_order_t *ord, const SolverMatrix *solvmtx, pastix_int_t initAt, pastix_bcsc_t *bcsc) 
Initializes the block csc matrix. More...  
void  bcscExit (pastix_bcsc_t *bcsc) 
Frees the block csc structure but do not free the bcsc pointer. More...  
Definition in file bcsc.c.

inlinestatic 
Initializes the dofshit array of size gNexp which gives dofshift[index_permuted] = index. This corresponds to the inverse of the permutation given in ord>permtab.
[in]  spm  The initial sparse matrix in the spm format. 
[in]  ord  The ordering that needs to be applied on the spm to generate the block csc. 
Definition at line 752 of file bcsc.c.
References pastix_int_t, and pastix_order_s::permtab.
Referenced by bcsc_init_coltab().

inlinestatic 
Initializes the coltab of a block csc matrix. The coltab corresponds to the number of rows (expended) per column (non expended). This rountine is called when the matrix is stored in shared memory or the matrix is replicated on the processors and the matrix's degree of liberty is constant.
[in]  spm  The initial sparse matrix in the spm format. 
[in]  ord  The ordering which needs to be applied on the spm to generate the block csc. 
[out]  globcol  The array which contains, for each column, its beginning in the smp>colptr. 
Definition at line 803 of file bcsc.c.
References pastix_int_t, and pastix_order_s::permtab.
Referenced by bcsc_init_global_coltab().

inlinestatic 
Initializes the coltab of a block csc matrix. The coltab corresponds to the number of rows (expended) per column (non expended). This rountine is called when the matrix is stored in shared memory or the matrix is replicated on the processors and the matrix's degree of liberty is variadic.
[in]  spm  The initial sparse matrix in the spm format. 
[in]  ord  The ordering which needs to be applied on the spm to generate the block csc. 
[out]  globcol  The array which contains, for each column, its begining in the smp>colptr. 
Definition at line 873 of file bcsc.c.
References pastix_int_t, and pastix_order_s::permtab.
Referenced by bcsc_init_global_coltab().

inlinestatic 
Initializes the coltab of a block csc matrix. The coltab corresponds to the number of rows (expended) per column (non expended). This routine is calls bcsc_init_global_coltab_[shm,dst]_[c,v]dof according to the way the matrix is stored and if the degree of liberty of the matrix is constant or variadic. If the matrix is distributed in the memory, this function also calls the routines which exchange the amount of data for the communication, store the indexes and values to send and exchange the indexes.
[in]  spm  The initial sparse matrix in the spm format. 
[in]  ord  The ordering which needs to be applied on the spm to generate the block csc. 
[in]  solvmtx  The solver matrix structure which describes the data distribution. 
[in]  col2cblk  The array which contains the repartition of the matrix columns into the block structure. 
[in,out]  bcsc_comm  The handle_comm_structure updated with the amount of data the current processor has to send to the other processor if PASTIX_WITH_MPI = ON and the matrix is distributed in memory. If it is not the case, bcsc_comm = NULL. 
Definition at line 1464 of file bcsc.c.
References bcsc_init_global_coltab_shm_cdof(), bcsc_init_global_coltab_shm_vdof(), pastix_int_t, and pastix_order_s::permtab.
Referenced by bcsc_init_coltab().

inlinestatic 
Initializes a block csc.
[in]  spm  The initial sparse matrix in the spm format. 
[in]  ord  The ordering which needs to be applied on the spm to generate the block csc. 
[in]  solvmtx  The solver matrix structure which describes the data distribution. 
[in]  initAt  The test to know if At has to be initialized:

[in,out]  bcsc  On 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. 
Definition at line 1813 of file bcsc.c.
References bcsc_cinit(), bcsc_dinit(), bcsc_init_coltab(), bcsc_init_struct(), bcsc_sinit(), bcsc_zinit(), and pastix_int_t.
Referenced by bcscInit().