SuperLU 7.0.0
Macros | Functions
util.c File Reference

Utility functions. More...

#include <math.h>
#include "slu_ddefs.h"
Include dependency graph for util.c:

Macros

#define NBUCKS   10
 Get the statistics of the supernodes. More...
 

Functions

void superlu_abort_and_exit (char *msg)
 Print message to error stream and exit program. More...
 
void set_default_options (superlu_options_t *options)
 Set the default values for the options argument. More...
 
void ilu_set_default_options (superlu_options_t *options)
 Set the default values for the options argument for ILU. More...
 
void print_options (superlu_options_t *options)
 Print the options setting. More...
 
void print_ilu_options (superlu_options_t *options)
 Print the options setting. More...
 
void Destroy_SuperMatrix_Store (SuperMatrix *A)
 Deallocate SuperMatrix. More...
 
void Destroy_CompCol_Matrix (SuperMatrix *A)
 Deallocate SuperMatrix of type NC. More...
 
void Destroy_CompRow_Matrix (SuperMatrix *A)
 Deallocate SuperMatrix of type NR. More...
 
void Destroy_SuperNode_Matrix (SuperMatrix *A)
 Deallocate SuperMatrix of type SC. More...
 
void Destroy_CompCol_Permuted (SuperMatrix *A)
 Deallocate SuperMatrix of type NCP. More...
 
void Destroy_Dense_Matrix (SuperMatrix *A)
 Deallocate SuperMatrix of type DN. More...
 
void resetrep_col (const int nseg, const int *segrep, int *repfnz)
 Reset repfnz[] for the current column. More...
 
void countnz (const int n, int_t *xprune, int_t *nnzL, int_t *nnzU, GlobalLU_t *Glu)
 Count the total number of nonzeros in factors L and U, and in the symmetrically reduced L. More...
 
void ilu_countnz (const int n, int_t *nnzL, int_t *nnzU, GlobalLU_t *Glu)
 Count the total number of nonzeros in factors L and U. More...
 
void fixupL (const int n, const int *perm_r, GlobalLU_t *Glu)
 Fix up the data storage lsub for L-subscripts. More...
 
void print_panel_seg (int n, int w, int jcol, int nseg, int *segrep, int *repfnz)
 Diagnostic print of segment info after panel_dfs(). More...
 
void StatInit (SuperLUStat_t *stat)
 Initialize SuperLU stat. More...
 
void StatPrint (SuperLUStat_t *stat)
 Display SuperLU stat. More...
 
void StatFree (SuperLUStat_t *stat)
 Deallocate SuperLU stat. More...
 
flops_t LUFactFlops (SuperLUStat_t *stat)
 Get operations for LU factorization. More...
 
flops_t LUSolveFlops (SuperLUStat_t *stat)
 Get operations for LU solve. More...
 
void ifill (int *a, int alen, int ival)
 Fills an integer array with a given value. More...
 
void super_stats (int nsuper, int *xsup)
 
float SpaSize (int n, int np, float sum_npw)
 
float DenseSize (int n, float sum_nw)
 
void check_repfnz (int n, int w, int jcol, int *repfnz)
 Check whether repfnz[] == EMPTY after reset. More...
 
void PrintSumm (char *type, int nfail, int nrun, int nerrs)
 Print a summary of the testing results. More...
 
void print_int_vec (char *what, int n, int *vec)
 Print content of int array. More...
 
void slu_PrintInt10 (char *name, int len, int *x)
 Print content of int array with index numbers after every tenth row. More...
 
void check_perm (char *what, int n, int *perm)
 Validity check of a permutation. More...
 

Macro Definition Documentation

◆ NBUCKS

#define NBUCKS   10

Function Documentation

◆ check_perm()

void check_perm ( char *  what,
int  n,
int *  perm 
)
Parameters
[in]whatString to be printed as part of displayed text for success or error.
[in]nNumber of elements in permutation perm.
[in]permArray describing the permutation.
Here is the call graph for this function:

◆ check_repfnz()

void check_repfnz ( int  n,
int  w,
int  jcol,
int *  repfnz 
)

◆ countnz()

void countnz ( const int  n,
int_t xprune,
int_t nnzL,
int_t nnzU,
GlobalLU_t Glu 
)

◆ DenseSize()

float DenseSize ( int  n,
float  sum_nw 
)

◆ Destroy_CompCol_Matrix()

void Destroy_CompCol_Matrix ( SuperMatrix A)

Deallocate the structure pointing to the actual storage of the matrix.

Parameters
[in,out]ADeallocate all memory of this SuperMatrix of type NC.

◆ Destroy_CompCol_Permuted()

void Destroy_CompCol_Permuted ( SuperMatrix A)

Deallocate the structure pointing to the actual storage of the matrix.

Parameters
[in,out]ADeallocate all memory of this SuperMatrix of type NCP.

◆ Destroy_CompRow_Matrix()

void Destroy_CompRow_Matrix ( SuperMatrix A)

Deallocate the structure pointing to the actual storage of the matrix.

Parameters
[in,out]ADeallocate all memory of this SuperMatrix of type NR.

◆ Destroy_Dense_Matrix()

void Destroy_Dense_Matrix ( SuperMatrix A)

Deallocate the structure pointing to the actual storage of the matrix.

Parameters
[in,out]ADeallocate all memory of this SuperMatrix of type DN.

◆ Destroy_SuperMatrix_Store()

void Destroy_SuperMatrix_Store ( SuperMatrix A)

Deallocate the structure pointing to the actual storage of the matrix.

Parameters
[in,out]ADeallocate all memory of this SuperMatrix.

◆ Destroy_SuperNode_Matrix()

void Destroy_SuperNode_Matrix ( SuperMatrix A)

Deallocate the structure pointing to the actual storage of the matrix.

Parameters
[in,out]ADeallocate all memory of this SuperMatrix of type SC.

◆ fixupL()

void fixupL ( const int  n,
const int *  perm_r,
GlobalLU_t Glu 
)

It removes the subscript sets for structural pruning, and applies permutation to the remaining subscripts.

◆ ifill()

void ifill ( int *  a,
int  alen,
int  ival 
)
Parameters
[in,out]aInteger array that is filled.
[in]alenLength of integer array a.
[in]ivalValue to be filled in every element of a.

◆ ilu_countnz()

void ilu_countnz ( const int  n,
int_t nnzL,
int_t nnzU,
GlobalLU_t Glu 
)

◆ ilu_set_default_options()

void ilu_set_default_options ( superlu_options_t options)
Parameters
[out]optionsOptions struct that is filled with default values.
Here is the call graph for this function:

◆ LUFactFlops()

flops_t LUFactFlops ( SuperLUStat_t stat)

Read out number of operations (ops) needed for LU factorization.

Parameters
[in]statSuperLU stat used to read out the opts.
Returns
Number of operations needed for LU factorization.

◆ LUSolveFlops()

flops_t LUSolveFlops ( SuperLUStat_t stat)

Read out number of operations (ops) needed for LU solve.

Parameters
[in]statSuperLU stat used to read out the opts.
Returns
Number of operations needed for LU solve.

◆ print_ilu_options()

void print_ilu_options ( superlu_options_t options)
Parameters
[in]optionsOptions struct that is printed.

◆ print_int_vec()

void print_int_vec ( char *  what,
int  n,
int *  vec 
)
Parameters
[in]whatVector name that is printed first.
[in]nNumber of elements in array.
[in]vecArray of ints to be printed

◆ print_options()

void print_options ( superlu_options_t options)
Parameters
[in]optionsOptions struct that is printed.

◆ print_panel_seg()

void print_panel_seg ( int  n,
int  w,
int  jcol,
int  nseg,
int *  segrep,
int *  repfnz 
)

◆ PrintSumm()

void PrintSumm ( char *  type,
int  nfail,
int  nrun,
int  nerrs 
)
Parameters
[in]typeArray with three chars indicating the type for that the tests were run like "CGE" or "DGE".
[in]nfailNumber of failed tests.
[in]nrunNumber of tests run.
[in]nerrsNumber of error messages recorded.

◆ resetrep_col()

void resetrep_col ( const int  nseg,
const int *  segrep,
int *  repfnz 
)

◆ set_default_options()

void set_default_options ( superlu_options_t options)
Parameters
[in,out]optionsOptions struct that is filled with default values.

◆ slu_PrintInt10()

void slu_PrintInt10 ( char *  name,
int  len,
int *  x 
)

Print all elements of an int array. After ten rows the index is printed to make it more readable for humans.

Parameters
[in]nameVector name that is printed first.
[in]lenNumber of elements in array.
[in]xArray of ints to be printed.

◆ SpaSize()

float SpaSize ( int  n,
int  np,
float  sum_npw 
)

◆ StatFree()

void StatFree ( SuperLUStat_t stat)

Deallocate the structure pointing to the actual storage of SuperLU stat.

Parameters
[in,out]statDeallocate all memory of this SuperLU stat

◆ StatInit()

void StatInit ( SuperLUStat_t stat)
Parameters
[in,out]statSuperLU stat that is initialized.
Here is the call graph for this function:

◆ StatPrint()

void StatPrint ( SuperLUStat_t stat)

Print content of SuperLU stat to output.

Parameters
[in]statDisplay this SuperLU stat

◆ super_stats()

void super_stats ( int  nsuper,
int *  xsup 
)
Here is the call graph for this function:

◆ superlu_abort_and_exit()

void superlu_abort_and_exit ( char *  msg)
Parameters
[in]mgsMessage that is printed to error stream.