SRC/cmemory.c File Reference

Memory details. More...

#include "slu_cdefs.h"

Include dependency graph for cmemory.c:


Data Structures

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

Defines

#define NO_MEMTYPE   4
#define GluIntArray(n)   (5 * (n) + 5)
#define StackFull(x)   ( x + stack.used >= stack.size )
#define NotDoubleAlign(addr)   ( (long int)addr & 7 )
#define DoubleAlign(addr)   ( ((long int)addr + 7) & ~7L )
#define TempSpace(m, w)
#define Reduce(alpha)   ((alpha + 1) / 2)

Typedefs

typedef struct e_node ExpHeader
 Headers for 4 types of dynamatically managed memory.

Functions

void * cexpand (int *prev_len,MemType type,int len_to_copy,int keep_prev,GlobalLU_t *Glu)
 Expand the existing storage to accommodate more fill-ins.
int cLUWorkInit (int m, int n, int panel_size, int **iworkptr, complex **dworkptr, LU_space_t MemModel)
 Allocate known working storage. Returns 0 if success, otherwise returns the number of bytes allocated so far when failure occurred.
void copy_mem_complex (int, void *, void *)
void cStackCompress (GlobalLU_t *Glu)
 Compress the work[] array to remove fragmentation.
void cSetupSpace (void *work, int lwork, LU_space_t *MemModel)
 Setup the memory model to be used for factorization.
void * cuser_malloc (int, int)
void cuser_free (int, int)
void copy_mem_int (int, void *, void *)
void user_bcopy (char *, char *, int)
int cQuerySpace (SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage)
int cLUMemInit (fact_t fact, void *work, int lwork, int m, int n, int annz, int panel_size, SuperMatrix *L, SuperMatrix *U, GlobalLU_t *Glu, int **iwork, complex **dwork)
 Allocate storage for the data structures common to all factor routines.
void cSetRWork (int m, int panel_size, complex *dworkptr, complex **dense, complex **tempv)
 Set up pointers for real working arrays.
void cLUWorkFree (int *iwork, complex *dwork, GlobalLU_t *Glu)
 Free the working storage used by factor routines.
int cLUMemXpand (int jcol, int next, MemType mem_type, int *maxlen, GlobalLU_t *Glu)
 Expand the data structures for L and U during the factorization.
void callocateA (int n, int nnz, complex **a, int **asub, int **xa)
 Allocate storage for original matrix A.
complexcomplexMalloc (int n)
complexcomplexCalloc (int n)
int cmemory_usage (const int nzlmax, const int nzumax, const int nzlumax, const int n)

Variables

static ExpHeaderexpanders = 0
static LU_stack_t stack
static int no_expand

Detailed Description

 -- SuperLU routine (version 3.0) --
 Univ. of California Berkeley, Xerox Palo Alto Research Center,
 and Lawrence Berkeley National Lab.
 October 15, 2003
 

Define Documentation

#define DoubleAlign ( addr   )     ( ((long int)addr + 7) & ~7L )

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

#define NO_MEMTYPE   4

#define NotDoubleAlign ( addr   )     ( (long int)addr & 7 )

#define Reduce ( alpha   )     ((alpha + 1) / 2)

#define StackFull (  )     ( x + stack.used >= stack.size )

#define TempSpace ( m,
 ) 

Value:

( (2*w + 4 + NO_MARKER) * m * sizeof(int) + \
            (w + 1) * m * sizeof(complex) )


Typedef Documentation

typedef struct e_node ExpHeader


Function Documentation

void callocateA ( int  n,
int  nnz,
complex **  a,
int **  asub,
int **  xa 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void * cexpand ( int *  prev_len,
MemType  type,
int  len_to_copy,
int  keep_prev,
GlobalLU_t Glu 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int cLUMemInit ( fact_t  fact,
void *  work,
int  lwork,
int  m,
int  n,
int  annz,
int  panel_size,
SuperMatrix L,
SuperMatrix U,
GlobalLU_t Glu,
int **  iwork,
complex **  dwork 
)

Memory-related.

 For those unpredictable size, make a guess as FILL * nnz(A).
 Return value:
     If lwork = -1, return the estimated amount of space required, plus n;
     otherwise, return the amount of space actually allocated when
     memory allocation failure occurred.
 

Here is the call graph for this function:

Here is the caller graph for this function:

int cLUMemXpand ( int  jcol,
int  next,
MemType  mem_type,
int *  maxlen,
GlobalLU_t Glu 
)

 Return value:   0 - successful return
               > 0 - number of bytes allocated when run out of space
 

Here is the call graph for this function:

Here is the caller graph for this function:

void cLUWorkFree ( int *  iwork,
complex dwork,
GlobalLU_t Glu 
)

Here is the caller graph for this function:

int cLUWorkInit ( int  m,
int  n,
int  panel_size,
int **  iworkptr,
complex **  dworkptr,
LU_space_t  MemModel 
)

Here is the call graph for this function:

Here is the caller graph for this function:

int cmemory_usage ( const int  nzlmax,
const int  nzumax,
const int  nzlumax,
const int  n 
)

Here is the caller graph for this function:

complex* complexCalloc ( int  n  ) 

Here is the caller graph for this function:

complex* complexMalloc ( int  n  ) 

Here is the caller graph for this function:

void copy_mem_complex ( int  howmany,
void *  old,
void *  new 
)

Here is the caller graph for this function:

void copy_mem_int ( int  ,
void *  ,
void *   
)

Here is the caller graph for this function:

int cQuerySpace ( SuperMatrix L,
SuperMatrix U,
mem_usage_t mem_usage 
)

 mem_usage consists of the following fields:
  • for_lu (float) The amount of space used in bytes for the L data structures.
  • total_needed (float) The amount of space needed in bytes to perform factorization.
  • expansions (int) Number of memory expansions during the LU factorization.

Here is the call graph for this function:

Here is the caller graph for this function:

void cSetRWork ( int  m,
int  panel_size,
complex dworkptr,
complex **  dense,
complex **  tempv 
)

Here is the call graph for this function:

Here is the caller graph for this function:

void cSetupSpace ( void *  work,
int  lwork,
LU_space_t MemModel 
)

lwork = 0: use system malloc; lwork > 0: use user-supplied work[] space.

Here is the caller graph for this function:

void cStackCompress ( GlobalLU_t Glu  ) 

Here is the call graph for this function:

void cuser_free ( int  bytes,
int  which_end 
)

Here is the caller graph for this function:

void * cuser_malloc ( int  bytes,
int  which_end 
)

Here is the caller graph for this function:

void user_bcopy ( char *  ,
char *  ,
int   
)

Here is the caller graph for this function:


Variable Documentation

ExpHeader* expanders = 0 [static]

int no_expand [static]

LU_stack_t stack [static]


Generated on Sat Aug 29 03:53:23 2009 for SuperLU by  doxygen 1.5.9