BlockIP
Macros
SparseCholSprsblkllt.C File Reference
#include <stdio.h>
#include <stdlib.h>
#include <algorithm>
#include "SparseChol.h"
#include "sprsblkllt.h"

Macros

#define ALLOC(n, type)   (type *)malloc((n)*sizeof(type))
 
#define REALLOC(ptr, n, type)   (type *)realloc(((char *)ptr),(n)*sizeof(type))
 
#define FREE(p)   if (p) {free(p); (p)= NULL;}
 
#define TRY_ALLOC(ptr, n, type)   if (!(ptr= ALLOC((n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);}
 
#define TRY_REALLOC(ptr, n, type)   if (!(ptr= REALLOC((ptr),(n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);}
 
#define ASSIGN_C(ix, fix, cx)   if (ix<=fix) cx= icola[ix]
 

Macro Definition Documentation

#define ALLOC (   n,
  type 
)    (type *)malloc((n)*sizeof(type))
#define ASSIGN_C (   ix,
  fix,
  cx 
)    if (ix<=fix) cx= icola[ix]
#define FREE (   p)    if (p) {free(p); (p)= NULL;}
#define REALLOC (   ptr,
  n,
  type 
)    (type *)realloc(((char *)ptr),(n)*sizeof(type))
#define TRY_ALLOC (   ptr,
  n,
  type 
)    if (!(ptr= ALLOC((n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);}
#define TRY_REALLOC (   ptr,
  n,
  type 
)    if (!(ptr= REALLOC((ptr),(n),type)) ) {throw ExceptionBlockIP(OUT_OF_MEMORY, __FILE__, __LINE__);}