slu_util.h File Reference

Utility header file. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "superlu_enum_consts.h"

Go to the source code of this file.

Classes

struct  superlu_options_t
 
struct  e_node
 Headers for 4 types of dynamatically managed memory. More...
 
struct  LU_stack_t
 
struct  SuperLUStat_t
 
struct  mem_usage_t
 

Macros

#define FIRSTCOL_OF_SNODE(i)   (xsup[i])
 
#define NO_MARKER   3
 
#define NUM_TEMPV(m, w, t, b)   ( SUPERLU_MAX(m, (t + b)*w) )
 
#define USER_ABORT(msg)   superlu_abort_and_exit(msg)
 
#define ABORT(err_msg)
 
#define USER_MALLOC(size)   superlu_malloc(size)
 
#define SUPERLU_MALLOC(size)   USER_MALLOC(size)
 
#define USER_FREE(addr)   superlu_free(addr)
 
#define SUPERLU_FREE(addr)   USER_FREE(addr)
 
#define CHECK_MALLOC(where)
 
#define SUPERLU_MAX(x, y)   ( (x) > (y) ? (x) : (y) )
 
#define SUPERLU_MIN(x, y)   ( (x) < (y) ? (x) : (y) )
 
#define L_SUB_START(col)   ( Lstore->rowind_colptr[col] )
 
#define L_SUB(ptr)   ( Lstore->rowind[ptr] )
 
#define L_NZ_START(col)   ( Lstore->nzval_colptr[col] )
 
#define L_FST_SUPC(superno)   ( Lstore->sup_to_col[superno] )
 
#define U_NZ_START(col)   ( Ustore->colptr[col] )
 
#define U_SUB(ptr)   ( Ustore->rowind[ptr] )
 
#define EMPTY   (-1)
 
#define FALSE   0
 
#define TRUE   1
 
#define NO_MEMTYPE
 
#define GluIntArray(n)   (5 * (n) + 5)
 
#define NODROP   ( 0x0000 )
 
#define DROP_BASIC   ( 0x0001 ) /* ILU(tau) */
 
#define DROP_PROWS   ( 0x0002 ) /* ILUTP: keep p maximum rows */
 
#define DROP_COLUMN
 
#define DROP_AREA
 
#define DROP_SECONDARY   ( 0x000E ) /* PROWS | COLUMN | AREA */
 
#define DROP_DYNAMIC   ( 0x0010 ) /* adaptive tau */
 
#define DROP_INTERP   ( 0x0100 ) /* use interpolation */
 
#define MILU_ALPHA   (1.0e-2) /* multiple of drop_sum to be added to diagonal */
 

Typedefs

typedef float flops_t
 
typedef unsigned char Logical
 
typedef struct e_node ExpHeader
 Headers for 4 types of dynamatically managed memory. More...
 

Functions

void Destroy_SuperMatrix_Store (SuperMatrix *)
 
void Destroy_CompCol_Matrix (SuperMatrix *)
 
void Destroy_CompRow_Matrix (SuperMatrix *)
 
void Destroy_SuperNode_Matrix (SuperMatrix *)
 
void Destroy_CompCol_Permuted (SuperMatrix *)
 
void Destroy_Dense_Matrix (SuperMatrix *)
 
void get_perm_c (int, SuperMatrix *, int *)
 
void set_default_options (superlu_options_t *options)
 
void ilu_set_default_options (superlu_options_t *options)
 
void sp_preorder (superlu_options_t *, SuperMatrix *, int *, int *, SuperMatrix *)
 
void superlu_abort_and_exit (char *)
 
void * superlu_malloc (size_t)
 
intintMalloc (int)
 
intintCalloc (int)
 
void superlu_free (void *)
 
void SetIWork (int, int, int, int *, int **, int **, int **, int **, int **, int **, int **)
 
int sp_coletree (int *, int *, int *, int, int, int *)
 
void relax_snode (const int, int *, const int, int *, int *)
 
void heap_relax_snode (const int, int *, const int, int *, int *)
 
int mark_relax (int, int *, int *, int *, int *, int *, int *)
 
void ilu_relax_snode (const int, int *, const int, int *, int *, int *)
 
void ilu_heap_relax_snode (const int, int *, const int, int *, int *, int *)
 
void resetrep_col (const int, const int *, int *)
 
int spcoletree (int *, int *, int *, int, int, int *)
 
intTreePostorder (int, int *)
 
double SuperLU_timer_ ()
 
int sp_ienv (int)
 
int lsame_ (char *, char *)
 
int xerbla_ (char *, int *)
 
void ifill (int *, int, int)
 
void snode_profile (int, int *)
 
void super_stats (int, int *)
 
void check_repfnz (int, int, int, int *)
 
void PrintSumm (char *, int, int, int)
 
void StatInit (SuperLUStat_t *)
 
void StatPrint (SuperLUStat_t *)
 
void StatFree (SuperLUStat_t *)
 
void print_panel_seg (int, int, int, int, int *, int *)
 
int print_int_vec (char *, int, int *)
 
int slu_PrintInt10 (char *, int, int *)
 

Detailed Description

Utility header file.

– SuperLU routine (version 4.1) – Univ. of California Berkeley, Xerox Palo Alto Research Center, and Lawrence Berkeley National Lab. November, 2010

Macro Definition Documentation

◆ ABORT

#define ABORT (   err_msg)
Value:
{ char msg[256];\
sprintf(msg,"%s at line %d in file %s\n",err_msg,__LINE__, __FILE__);\
USER_ABORT(msg); }

◆ CHECK_MALLOC

#define CHECK_MALLOC (   where)
Value:
{ \
extern int superlu_malloc_total; \
printf("%s: malloc_total %d Bytes\n", \
where, superlu_malloc_total); \
}

◆ DROP_AREA

#define DROP_AREA
Value:
( 0x0008 ) /* ILUTP: for j-th column, use
nnz(F(:,1:j)) / nnz(A(:,1:j))
to limit memory growth */

◆ DROP_BASIC

#define DROP_BASIC   ( 0x0001 ) /* ILU(tau) */

◆ DROP_COLUMN

#define DROP_COLUMN
Value:
( 0x0004 ) /* ILUTP: for j-th column,
p = gamma * nnz(A(:,j)) */

◆ DROP_DYNAMIC

#define DROP_DYNAMIC   ( 0x0010 ) /* adaptive tau */

◆ DROP_INTERP

#define DROP_INTERP   ( 0x0100 ) /* use interpolation */

◆ DROP_PROWS

#define DROP_PROWS   ( 0x0002 ) /* ILUTP: keep p maximum rows */

◆ DROP_SECONDARY

#define DROP_SECONDARY   ( 0x000E ) /* PROWS | COLUMN | AREA */

◆ EMPTY

#define EMPTY   (-1)

◆ FALSE

#define FALSE   0

◆ FIRSTCOL_OF_SNODE

#define FIRSTCOL_OF_SNODE (   i)    (xsup[i])

◆ GluIntArray

#define GluIntArray (   n)    (5 * (n) + 5)

◆ L_FST_SUPC

#define L_FST_SUPC (   superno)    ( Lstore->sup_to_col[superno] )

◆ L_NZ_START

#define L_NZ_START (   col)    ( Lstore->nzval_colptr[col] )

◆ L_SUB

#define L_SUB (   ptr)    ( Lstore->rowind[ptr] )

◆ L_SUB_START

#define L_SUB_START (   col)    ( Lstore->rowind_colptr[col] )

◆ MILU_ALPHA

#define MILU_ALPHA   (1.0e-2) /* multiple of drop_sum to be added to diagonal */

◆ NO_MARKER

#define NO_MARKER   3

◆ NO_MEMTYPE

#define NO_MEMTYPE
Value:
4 /* 0: lusup;
1: ucol;
2: lsub;
3: usub */

◆ NODROP

#define NODROP   ( 0x0000 )

◆ NUM_TEMPV

#define NUM_TEMPV (   m,
  w,
  t,
  b 
)    ( SUPERLU_MAX(m, (t + b)*w) )

◆ SUPERLU_FREE

#define SUPERLU_FREE (   addr)    USER_FREE(addr)

◆ SUPERLU_MALLOC

#define SUPERLU_MALLOC (   size)    USER_MALLOC(size)

◆ SUPERLU_MAX

#define SUPERLU_MAX (   x,
  y 
)    ( (x) > (y) ? (x) : (y) )

◆ SUPERLU_MIN

#define SUPERLU_MIN (   x,
  y 
)    ( (x) < (y) ? (x) : (y) )

◆ TRUE

#define TRUE   1

◆ U_NZ_START

#define U_NZ_START (   col)    ( Ustore->colptr[col] )

◆ U_SUB

#define U_SUB (   ptr)    ( Ustore->rowind[ptr] )

◆ USER_ABORT

#define USER_ABORT (   msg)    superlu_abort_and_exit(msg)

◆ USER_FREE

#define USER_FREE (   addr)    superlu_free(addr)

◆ USER_MALLOC

#define USER_MALLOC (   size)    superlu_malloc(size)

Typedef Documentation

◆ ExpHeader

typedef struct e_node ExpHeader

Headers for 4 types of dynamatically managed memory.

◆ flops_t

typedef float flops_t

◆ Logical

Function Documentation

◆ check_repfnz()

void check_repfnz ( int  ,
int  ,
int  ,
int  
)

◆ Destroy_CompCol_Matrix()

void Destroy_CompCol_Matrix ( SuperMatrix )

◆ Destroy_CompCol_Permuted()

void Destroy_CompCol_Permuted ( SuperMatrix )

◆ Destroy_CompRow_Matrix()

void Destroy_CompRow_Matrix ( SuperMatrix )

◆ Destroy_Dense_Matrix()

void Destroy_Dense_Matrix ( SuperMatrix )

◆ Destroy_SuperMatrix_Store()

void Destroy_SuperMatrix_Store ( SuperMatrix )

◆ Destroy_SuperNode_Matrix()

void Destroy_SuperNode_Matrix ( SuperMatrix )

◆ get_perm_c()

void get_perm_c ( int  ,
SuperMatrix ,
int  
)

◆ heap_relax_snode()

void heap_relax_snode ( const int  ,
int ,
const int  ,
int ,
int  
)

◆ ifill()

void ifill ( int ,
int  ,
int   
)

◆ ilu_heap_relax_snode()

void ilu_heap_relax_snode ( const int  ,
int ,
const int  ,
int ,
int ,
int  
)

◆ ilu_relax_snode()

void ilu_relax_snode ( const int  ,
int ,
const int  ,
int ,
int ,
int  
)

◆ ilu_set_default_options()

void ilu_set_default_options ( superlu_options_t options)

◆ intCalloc()

int* intCalloc ( int  )

◆ intMalloc()

int* intMalloc ( int  )

◆ lsame_()

int lsame_ ( char ,
char  
)

◆ mark_relax()

int mark_relax ( int  ,
int ,
int ,
int ,
int ,
int ,
int  
)

◆ print_int_vec()

int print_int_vec ( char ,
int  ,
int  
)

◆ print_panel_seg()

void print_panel_seg ( int  ,
int  ,
int  ,
int  ,
int ,
int  
)

◆ PrintSumm()

void PrintSumm ( char ,
int  ,
int  ,
int   
)

◆ relax_snode()

void relax_snode ( const int  ,
int ,
const int  ,
int ,
int  
)

◆ resetrep_col()

void resetrep_col ( const int  ,
const int ,
int  
)

◆ set_default_options()

◆ SetIWork()

void SetIWork ( int  ,
int  ,
int  ,
int ,
int **  ,
int **  ,
int **  ,
int **  ,
int **  ,
int **  ,
int **   
)

◆ slu_PrintInt10()

int slu_PrintInt10 ( char ,
int  ,
int  
)

◆ snode_profile()

void snode_profile ( int  ,
int  
)

◆ sp_coletree()

int sp_coletree ( int ,
int ,
int ,
int  ,
int  ,
int  
)

◆ sp_ienv()

int sp_ienv ( int  )

◆ sp_preorder()

void sp_preorder ( superlu_options_t ,
SuperMatrix ,
int ,
int ,
SuperMatrix  
)

◆ spcoletree()

int spcoletree ( int ,
int ,
int ,
int  ,
int  ,
int  
)

◆ StatFree()

◆ StatInit()

◆ StatPrint()

void StatPrint ( SuperLUStat_t )

◆ super_stats()

void super_stats ( int  ,
int  
)

◆ superlu_abort_and_exit()

void superlu_abort_and_exit ( char )

◆ superlu_free()

void superlu_free ( void *  )

◆ superlu_malloc()

void* superlu_malloc ( size_t  )

◆ SuperLU_timer_()

double SuperLU_timer_ ( )

◆ TreePostorder()

int* TreePostorder ( int  ,
int  
)

◆ xerbla_()

int xerbla_ ( char ,
int  
)