Blender V2.61 - r43446
Classes | Defines | Typedefs | Functions | Variables

smemory.c File Reference

#include "ssp_defs.h"
#include "superlu_sys_types.h"

Go to the source code of this file.

Classes

struct  e_node
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)   ( (intptr_t)addr & 7 )
#define DoubleAlign(addr)   ( ((intptr_t)addr + 7) & ~7L )
#define TempSpace(m, w)
#define Reduce(alpha)   ((alpha + 1) / 2)

Typedefs

typedef struct e_node ExpHeader

Functions

void * sexpand (int *, MemType, int, int, GlobalLU_t *)
int sLUWorkInit (int, int, int, int **, float **, LU_space_t)
void copy_mem_float (int, void *, void *)
void sStackCompress (GlobalLU_t *)
void sSetupSpace (void *, int, LU_space_t *)
void * suser_malloc (int, int)
void suser_free (int, int)
void copy_mem_int (int, void *, void *)
void user_bcopy (char *, char *, int)
int sQuerySpace (SuperMatrix *L, SuperMatrix *U, mem_usage_t *mem_usage)
int sLUMemInit (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, float **dwork)
void sSetRWork (int m, int panel_size, float *dworkptr, float **dense, float **tempv)
void sLUWorkFree (int *iwork, float *dwork, GlobalLU_t *Glu)
int sLUMemXpand (int jcol, int next, MemType mem_type, int *maxlen, GlobalLU_t *Glu)
void sallocateA (int n, int nnz, float **a, int **asub, int **xa)
float * floatMalloc (int n)
float * floatCalloc (int n)
int smemory_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

Definition in file smemory.c.


Define Documentation

#define DoubleAlign (   addr)    ( ((intptr_t)addr + 7) & ~7L )

Definition at line 58 of file smemory.c.

Referenced by sexpand(), and sLUWorkInit().

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

Definition at line 21 of file smemory.c.

Referenced by sLUMemInit().

#define NO_MEMTYPE   4

Definition at line 17 of file smemory.c.

Referenced by sLUMemInit().

#define NotDoubleAlign (   addr)    ( (intptr_t)addr & 7 )

Definition at line 57 of file smemory.c.

Referenced by sexpand(), and sLUWorkInit().

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

Definition at line 61 of file smemory.c.

Referenced by sexpand().

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

Definition at line 56 of file smemory.c.

Referenced by sexpand(), and suser_malloc().

#define TempSpace (   m,
 
)
Value:
( (2*w + 4 + NO_MARKER) * m * sizeof(int) + \
                  (w + 1) * m * sizeof(float) )

Definition at line 59 of file smemory.c.

Referenced by sLUMemInit().


Typedef Documentation

typedef struct e_node ExpHeader

Function Documentation

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

Definition at line 446 of file smemory.c.

References i.

Referenced by sexpand(), and sStackCompress().

void copy_mem_int ( int  ,
void *  ,
void *   
)

Precision-independent memory-related routines. (Shared by [sdcz]memory.c)

Definition at line 116 of file memory.c.

References i.

Referenced by sexpand(), and sStackCompress().

float* floatCalloc ( int  n)

Definition at line 656 of file smemory.c.

References ABORT, i, and SUPERLU_MALLOC.

Referenced by sgstrs(), and sp_strsv().

float* floatMalloc ( int  n)

Definition at line 646 of file smemory.c.

References ABORT, and SUPERLU_MALLOC.

Referenced by sallocateA(), sCompRow_to_CompCol(), and sgstrs().

void sallocateA ( int  n,
int  nnz,
float **  a,
int **  asub,
int **  xa 
)

Definition at line 638 of file smemory.c.

References floatMalloc(), and intMalloc().

void * sexpand ( int *  prev_len,
MemType  type,
int  len_to_copy,
int  keep_prev,
GlobalLU_t Glu 
)
int sLUMemInit ( 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,
float **  dwork 
)
int sLUMemXpand ( int  jcol,
int  next,
MemType  mem_type,
int *  maxlen,
GlobalLU_t Glu 
)
void sLUWorkFree ( int *  iwork,
float *  dwork,
GlobalLU_t Glu 
)

Definition at line 373 of file smemory.c.

References GlobalLU_t::MemModel, LU_stack_t::size, SUPERLU_FREE, SYSTEM, LU_stack_t::top2, and LU_stack_t::used.

Referenced by sgstrf().

int sLUWorkInit ( int  m,
int  n,
int  panel_size,
int **  iworkptr,
float **  dworkptr,
LU_space_t  MemModel 
)
int smemory_usage ( const int  nzlmax,
const int  nzumax,
const int  nzlumax,
const int  n 
)

Definition at line 670 of file smemory.c.

Referenced by sLUMemInit(), and sLUMemXpand().

int sQuerySpace ( SuperMatrix L,
SuperMatrix U,
mem_usage_t mem_usage 
)
void sSetRWork ( int  m,
int  panel_size,
float *  dworkptr,
float **  dense,
float **  tempv 
)

Definition at line 357 of file smemory.c.

References NUM_TEMPV, sfill(), and sp_ienv().

Referenced by sgstrf().

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

Definition at line 71 of file smemory.c.

References LU_stack_t::array, LU_stack_t::size, SYSTEM, LU_stack_t::top1, LU_stack_t::top2, LU_stack_t::used, and USER.

Referenced by sLUMemInit().

void sStackCompress ( GlobalLU_t Glu)
void suser_free ( int  bytes,
int  which_end 
)

Definition at line 106 of file smemory.c.

References HEAD, LU_stack_t::top1, LU_stack_t::top2, and LU_stack_t::used.

Referenced by sLUMemInit().

void * suser_malloc ( int  bytes,
int  which_end 
)
void user_bcopy ( char *  ,
char *  ,
int   
)

Definition at line 126 of file memory.c.

Referenced by sexpand().


Variable Documentation

ExpHeader* expanders = 0 [static]

Definition at line 51 of file smemory.c.

int no_expand [static]

Definition at line 53 of file smemory.c.

Referenced by sexpand(), sLUMemInit(), and sQuerySpace().

LU_stack_t stack [static]