PaStiX Handbook  6.3.2
solver_copy.c File Reference
#include "common.h"
#include "queue.h"
#include "blend/solver.h"

Go to the source code of this file.

Functions

static void solver_copy (const SolverMatrix *solvin, SolverMatrix *solvout, pastix_coeftype_t flttype)
 Copy the solver matrix data structure from solvin to solvout. More...
 
SolverMatrixsolverCopy (const SolverMatrix *solvin, pastix_coeftype_t flttype)
 Generate a copy of a solver matrix structure. More...
 
void solverRealloc (SolverMatrix *solvmtx)
 Realloc in a contiguous way a given solver structure. More...
 

Detailed Description

PaStiX solver matrix copy and reallocation functions.

Version
6.3.2
Author
Pascal Henon
Mathieu Faverge
Tony Delarue
Date
2023-07-21

Definition in file solver_copy.c.

Function Documentation

◆ solver_copy()

static void solver_copy ( const SolverMatrix solvin,
SolverMatrix solvout,
pastix_coeftype_t  flttype 
)
inlinestatic

Copy the solver matrix data structure from solvin to solvout.

Every data is copied, event the coefficient if they are allocated and initialized. It is also used to reallocate the data in a contiguous way after the initialization that allocates all internal arrays in multiple step which might results in fragmentation.

Warning
This function is not able to copy a solver matrix with low rank blocks yet.
Parameters
[in]solvinThe solver matrix structure to duplicate.
[out]solvoutThe allocated pointer to the solver matrix structure that will contain the copy.
[in]flttypeThe floating point arithmetic used in the input solver matrix to know the size of the memory space to duplicate for the coefficients.

Definition at line 51 of file solver_copy.c.

References solver_matrix_s::bloknbr, solver_matrix_s::bloktab, solver_matrix_s::brownbr, solver_matrix_s::browtab, cblk_colnbr(), solver_matrix_s::cblknbr, solver_matrix_s::cblktab, solver_cblk_s::cblktype, solver_cblk_s::fblokptr, solver_matrix_s::gcbl2loc, solver_matrix_s::gcblknbr, solver_cblk_s::lcoeftab, pastix_int_t, solver_cblk_s::stride, and solver_cblk_s::ucoeftab.

Referenced by solverCopy(), and solverRealloc().