Nek5000
SEM for Incompressible NS
|
Go to the source code of this file.
Classes | |
struct | array |
Macros | |
#define | PRINT_MALLOCS 0 |
#define | tmalloc(type, count) ((type*) smalloc((count)*sizeof(type),__FILE__,__LINE__) ) |
#define | tcalloc(type, count) ((type*) scalloc((count),sizeof(type),__FILE__,__LINE__) ) |
#define | trealloc(type, ptr, count) ((type*) srealloc((ptr),(count)*sizeof(type),__FILE__,__LINE__) ) |
#define | null_array {0,0,0} |
#define | array_free(a) (free((a)->ptr)) |
#define | array_init(T, a, max) array_init_(a,max,sizeof(T),__FILE__,__LINE__) |
#define | array_resize(T, a, max) array_resize_(a,max,sizeof(T),__FILE__,__LINE__) |
#define | array_reserve(T, a, min) array_reserve_(a,min,sizeof(T),__FILE__,__LINE__) |
#define | array_cat(T, d, s, n) array_cat_(sizeof(T),d,s,n,__FILE__,__LINE__) |
#define | null_buffer null_array |
#define | buffer_init(b, max) array_init(char,b,max) |
#define | buffer_resize(b, max) array_resize(char,b,max) |
#define | buffer_reserve(b, max) array_reserve(char,b,max) |
#define | buffer_free(b) array_free(b) |
#define | ALIGNOF(T) offsetof(struct { char c; T x; }, x) |
#define | align_as(T, n) align_as_(ALIGNOF(T),n) |
#define | align_ptr(T, base, offset) ((T*)((char*)(base)+align_as(T,offset))) |
Typedefs | |
typedef struct array | buffer |
Functions | |
static void * | smalloc (size_t size, const char *file, unsigned line) |
static void * | scalloc (size_t nmemb, size_t size, const char *file, unsigned line) |
static void * | srealloc (void *restrict ptr, size_t size, const char *file, unsigned line) |
static void | array_init_ (struct array *a, size_t max, size_t size, const char *file, unsigned line) |
static void | array_resize_ (struct array *a, size_t max, size_t size, const char *file, unsigned line) |
static void * | array_reserve_ (struct array *a, size_t min, size_t size, const char *file, unsigned line) |
static void | array_cat_ (size_t size, struct array *d, const void *s, size_t n, const char *file, unsigned line) |
static size_t | align_as_ (size_t a, size_t n) |
Definition at line 163 of file mem.h.
Referenced by fcrystal_ituple_sort(), and fcrystal_tuple_sort().
#define array_cat | ( | T, | |
d, | |||
s, | |||
n | |||
) | array_cat_(sizeof(T),d,s,n,__FILE__,__LINE__) |
#define array_free | ( | a | ) | (free((a)->ptr)) |
Definition at line 135 of file mem.h.
Referenced by cr_setup_aux(), crs_setup(), findpts(), findpts_eval(), findpts_local(), gs_topology_free(), hash_build(), main(), separate_matrix(), and shared_ids().
#define array_init | ( | T, | |
a, | |||
max | |||
) | array_init_(a,max,sizeof(T),__FILE__,__LINE__) |
Definition at line 136 of file mem.h.
Referenced by discover_dofs(), findpts(), findpts_eval(), hash_build(), main(), map_points_to_els(), nonzero_ids(), separate_matrix(), shared_ids(), shared_ids_aux(), and unique_ids().
#define array_reserve | ( | T, | |
a, | |||
min | |||
) | array_reserve_(a,min,sizeof(T),__FILE__,__LINE__) |
Definition at line 138 of file mem.h.
Referenced by cr_learn(), fgs_fields(), make_topology_unique(), map_points_to_els(), and shared_ids().
#define array_resize | ( | T, | |
a, | |||
max | |||
) | array_resize_(a,max,sizeof(T),__FILE__,__LINE__) |
Definition at line 137 of file mem.h.
Referenced by nonzero_ids().
#define buffer_free | ( | b | ) | array_free(b) |
Definition at line 158 of file mem.h.
Referenced by crs_setup(), crystal_free(), findpts_local_free(), and main().
#define buffer_init | ( | b, | |
max | |||
) | array_init(char,b,max) |
Definition at line 155 of file mem.h.
Referenced by crs_setup(), crystal_init(), fcrystal_setup(), ffindpts_setup(), and main().
#define buffer_reserve | ( | b, | |
max | |||
) | array_reserve(char,b,max) |
Definition at line 157 of file mem.h.
Referenced by crystal_exchange(), crystal_move(), discover_dofs(), discover_sep_sizes(), dry_run_time(), gs_aux(), main(), orthogonalize(), sarray_permute_buf_(), sortp(), sortv(), and sparse_cholesky_factor().
#define buffer_resize | ( | b, | |
max | |||
) | array_resize(char,b,max) |
#define null_array {0,0,0} |
Definition at line 112 of file mem.h.
Referenced by cr_setup_aux(), and main().
#define null_buffer null_array |
#define tcalloc | ( | type, | |
count | |||
) | ((type*) scalloc((count),sizeof(type),__FILE__,__LINE__) ) |
Definition at line 93 of file mem.h.
Referenced by hash_build().
#define tmalloc | ( | type, | |
count | |||
) | ((type*) smalloc((count)*sizeof(type),__FILE__,__LINE__) ) |
Definition at line 91 of file mem.h.
Referenced by allocate_X(), allreduce_map_setup(), allreduce_setup_aux(), condense_matrix(), cr_schedule(), cr_setup_aux(), crl_maps(), crs_setup(), discover_dofs(), discover_sep_ids(), discover_sep_sizes(), factor_numeric(), factor_symbolic(), fcrystal_setup(), ffindpts_setup(), fgs_setup_pick(), findpts(), findpts_el_setup_2(), findpts_el_setup_3(), findpts_local_setup(), findpts_setup(), flagged_primaries_map(), gll_lag_setup(), gs_setup(), hash_build(), lagrange_setup(), lob_bnd_setup(), local_map(), locate_proc(), main(), obbox_calc_2(), obbox_calc_3(), pw_comm_setup(), pw_map_setup(), pw_setup_aux(), ref_lagrange_setup(), table_from_hash(), and test().
#define trealloc | ( | type, | |
ptr, | |||
count | |||
) | ((type*) srealloc((ptr),(count)*sizeof(type),__FILE__,__LINE__) ) |
Definition at line 95 of file mem.h.
Referenced by fcrs_setup(), fcrystal_setup(), ffindpts_setup(), and fgs_setup_pick().
|
static |
Definition at line 164 of file mem.h.
Referenced by sarray_permute_buf_().
|
static |
|
static |
Definition at line 113 of file mem.h.
References array::max, array::n, array::ptr, and smalloc().
|
static |
Definition at line 123 of file mem.h.
References array_resize_(), array::max, and array::ptr.
Referenced by array_cat_(), and sarray_transfer_many().
|
static |
Definition at line 118 of file mem.h.
References array::max, array::ptr, and srealloc().
Referenced by array_reserve_().
|
inlinestatic |
Definition at line 57 of file mem.h.
References comm_gbl_id, fail(), and restrict.
|
inlinestatic |
Definition at line 45 of file mem.h.
References comm_gbl_id, fail(), and restrict.
Referenced by array_init_().
|
inlinestatic |
Definition at line 71 of file mem.h.
References comm_gbl_id, fail(), and restrict.
Referenced by array_resize_().