PIPS
newgen_map.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define HASH_GET(start, image, h, k)    hash_map_get((const hash_table)(h), (const void *)(k))
 
#define HASH_BOUND_P(start, image, h, k)    hash_map_defined_p((const hash_table)(h), (const void *)(k))
 
#define HASH_UPDATE(start, image, h, k, v)    hash_map_update((h), (const void *)(k), (const void *)(v))
 
#define HASH_EXTEND(start, image, h, k, v)    hash_map_put((h), (const void *)(k), (const void *)(v))
 
#define HASH_DELETE(start, image, h, k)    hash_map_del((h), (const void *)(k))
 
#define FUNCTION_MAP(type, start, image, k, v, code, fun)
 
#define FUNCTION_FOREACH(type, key, val, k, v, fun)
 

Macro Definition Documentation

◆ FUNCTION_FOREACH

#define FUNCTION_FOREACH (   type,
  key,
  val,
  k,
  v,
  fun 
)
Value:
type NGMID(f) = fun; \
message_assert("check domain", \
NGMID(f) && type##_defined_p(NGMID(f)) && \
type##_domain_number(NGMID(f)) == type##_domain); \
hash_table NGMID(h) = type##_hash_table(NGMID(f)); \
type##_key_type k; \
type##_value_type v; \
gen_chunk * NGMID(k); \
gen_chunk * NGMID(v); \
for (register void * NGMID(i) = NULL; \
((NGMID(i) = \
hash_table_scan(NGMID(h), NGMID(i), \
(void**) & NGMID(k), (void**) & NGMID(v))), \
k = (type##_key_type) (NGMID(i)? NGMID(k)->key: NULL), \
v = (type##_value_type) (NGMID(i)? NGMID(v)->val: NULL), \
NGMID(i));)
#define NGMID(f)
Definition: newgen_types.h:126
int f(int off1, int off2, int n, float r[n], float a[n], float b[n])
Definition: offsets.c:15

Definition at line 60 of file newgen_map.h.

◆ FUNCTION_MAP

#define FUNCTION_MAP (   type,
  start,
  image,
  k,
  v,
  code,
  fun 
)
Value:
{ \
type NGMID(f) = (fun); \
hash_table NGMID(h) = (type##_hash_table(NGMID(f))); \
register void * NGMID(i) = NULL; \
gen_chunk * NGMID(k); \
gen_chunk * NGMID(v); \
while ((NGMID(i) = \
(void**) &NGMID(k), (void**) &NGMID(v)))) \
{ \
type##_key_type k = (type##_key_type) (NGMID(k))->start ; \
type##_value_type v = (type##_value_type) (NGMID(v))->image; \
code ; \
} \
}
static char start[1024]
The name of the variable from which to start counting domain numbers.
Definition: genLisp.c:55
void * hash_table_scan(hash_table htp, void *hentryp_arg, void **pkey, void **pval)
Definition: hash.c:844
code taken from http://fast-edge.googlecode.com and adapted to c99
Definition: erode_dilate.c:33

Definition at line 42 of file newgen_map.h.

◆ HASH_BOUND_P

#define HASH_BOUND_P (   start,
  image,
  h,
 
)     hash_map_defined_p((const hash_table)(h), (const void *)(k))

Definition at line 32 of file newgen_map.h.

◆ HASH_DELETE

#define HASH_DELETE (   start,
  image,
  h,
 
)     hash_map_del((h), (const void *)(k))

Definition at line 38 of file newgen_map.h.

◆ HASH_EXTEND

#define HASH_EXTEND (   start,
  image,
  h,
  k,
 
)     hash_map_put((h), (const void *)(k), (const void *)(v))

Definition at line 36 of file newgen_map.h.

◆ HASH_GET

#define HASH_GET (   start,
  image,
  h,
 
)     hash_map_get((const hash_table)(h), (const void *)(k))

Definition at line 30 of file newgen_map.h.

◆ HASH_UPDATE

#define HASH_UPDATE (   start,
  image,
  h,
  k,
 
)     hash_map_update((h), (const void *)(k), (const void *)(v))

Definition at line 34 of file newgen_map.h.