SuperLU
5.2.0
|
Memory details. More...
#include "slu_cdefs.h"
Macros | |
#define | StackFull(x) ( x + Glu->stack.used >= Glu->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) /* i.e. (alpha-1)/2 + 1 */ |
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. More... | |
int | cLUWorkInit (int m, int n, int panel_size, int **iworkptr, complex **dworkptr, GlobalLU_t *Glu) |
Allocate known working storage. Returns 0 if success, otherwise returns the number of bytes allocated so far when failure occurred. More... | |
void | copy_mem_complex (int, void *, void *) |
void | cStackCompress (GlobalLU_t *Glu) |
Compress the work[] array to remove fragmentation. More... | |
void | cSetupSpace (void *work, int lwork, GlobalLU_t *Glu) |
Setup the memory model to be used for factorization. More... | |
void * | cuser_malloc (int, int, GlobalLU_t *) |
void | cuser_free (int, int, GlobalLU_t *) |
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 | ilu_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, float fill_ratio, SuperMatrix *L, SuperMatrix *U, GlobalLU_t *Glu, int **iwork, complex **dwork) |
Allocate storage for the data structures common to all factor routines. More... | |
void | cSetRWork (int m, int panel_size, complex *dworkptr, complex **dense, complex **tempv) |
Set up pointers for real working arrays. More... | |
void | cLUWorkFree (int *iwork, complex *dwork, GlobalLU_t *Glu) |
Free the working storage used by factor routines. More... | |
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. More... | |
void | callocateA (int n, int nnz, complex **a, int **asub, int **xa) |
Allocate storage for original matrix A. More... | |
complex * | complexMalloc (int n) |
complex * | complexCalloc (int n) |
int | cmemory_usage (const int nzlmax, const int nzumax, const int nzlumax, const int n) |
Copyright (c) 2003, The Regents of the University of California, through Lawrence Berkeley National Laboratory (subject to receipt of any required approvals from U.S. Dept. of Energy)
All rights reserved.
The source code is distributed under BSD license, see the file License.txt at the top-level directory.
– SuperLU routine (version 4.0) – Lawrence Berkeley National Laboratory. June 30, 2009
#define DoubleAlign | ( | addr | ) | ( ((intptr_t)addr + 7) & ~7L ) |
#define NotDoubleAlign | ( | addr | ) | ( (intptr_t)addr & 7 ) |
#define Reduce | ( | alpha | ) | ((alpha + 1) / 2) /* i.e. (alpha-1)/2 + 1 */ |
#define StackFull | ( | x | ) | ( x + Glu->stack.used >= Glu->stack.size ) |
#define TempSpace | ( | m, | |
w | |||
) |
void callocateA | ( | int | n, |
int | nnz, | ||
complex ** | a, | ||
int ** | asub, | ||
int ** | xa | ||
) |
void * cexpand | ( | int * | prev_len, |
MemType | type, | ||
int | len_to_copy, | ||
int | keep_prev, | ||
GlobalLU_t * | Glu | ||
) |
int cLUMemInit | ( | fact_t | fact, |
void * | work, | ||
int | lwork, | ||
int | m, | ||
int | n, | ||
int | annz, | ||
int | panel_size, | ||
float | fill_ratio, | ||
SuperMatrix * | L, | ||
SuperMatrix * | U, | ||
GlobalLU_t * | Glu, | ||
int ** | iwork, | ||
complex ** | dwork | ||
) |
Memory-related.
For those unpredictable size, estimate as fill_ratio * 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.
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
void cLUWorkFree | ( | int * | iwork, |
complex * | dwork, | ||
GlobalLU_t * | Glu | ||
) |
int cLUWorkInit | ( | int | m, |
int | n, | ||
int | panel_size, | ||
int ** | iworkptr, | ||
complex ** | dworkptr, | ||
GlobalLU_t * | Glu | ||
) |
int cmemory_usage | ( | const int | nzlmax, |
const int | nzumax, | ||
const int | nzlumax, | ||
const int | n | ||
) |
complex* complexCalloc | ( | int | n | ) |
complex* complexMalloc | ( | int | n | ) |
void copy_mem_complex | ( | int | howmany, |
void * | old, | ||
void * | new | ||
) |
void copy_mem_int | ( | int | , |
void * | , | ||
void * | |||
) |
int cQuerySpace | ( | SuperMatrix * | L, |
SuperMatrix * | U, | ||
mem_usage_t * | mem_usage | ||
) |
mem_usage consists of the following fields:
void cSetupSpace | ( | void * | work, |
int | lwork, | ||
GlobalLU_t * | Glu | ||
) |
lwork = 0: use system malloc; lwork > 0: use user-supplied work[] space.
void cStackCompress | ( | GlobalLU_t * | Glu | ) |
void cuser_free | ( | int | bytes, |
int | which_end, | ||
GlobalLU_t * | Glu | ||
) |
void * cuser_malloc | ( | int | bytes, |
int | which_end, | ||
GlobalLU_t * | Glu | ||
) |
int ilu_cQuerySpace | ( | SuperMatrix * | L, |
SuperMatrix * | U, | ||
mem_usage_t * | mem_usage | ||
) |
mem_usage consists of the following fields:
void user_bcopy | ( | char * | , |
char * | , | ||
int | |||
) |