gwion-util
utilities for the Gwion project
Loading...
Searching...
No Matches
container.h File Reference

macros and meta-header for container types More...

#include "vector.h"
#include "m_vector.h"
#include "map.h"
#include "scope.h"

Go to the source code of this file.

Macros

#define MAP_CAP   8 /*< base container capacity */
 
#define OFFSET   2 /*< size of container offset */
 
#define VLEN(v)
 
#define VCAP(v)
 
#define VPTR(v, i)
 

Typedefs

typedef uintptr_t vtype
 

Detailed Description

macros and meta-header for container types

Definition in file container.h.

Macro Definition Documentation

◆ MAP_CAP

#define MAP_CAP   8 /*< base container capacity */

Definition at line 8 of file container.h.

◆ OFFSET

#define OFFSET   2 /*< size of container offset */

Definition at line 9 of file container.h.

◆ VCAP

#define VCAP ( v)
Value:
(v)->ptr[1] /*< capacity */

Definition at line 11 of file container.h.

◆ VLEN

#define VLEN ( v)
Value:
(v)->ptr[0] /*< length */

Definition at line 10 of file container.h.

◆ VPTR

#define VPTR ( v,
i )
Value:
(v)->ptr[OFFSET + (i)] /* pointer to data */
#define OFFSET
Definition container.h:9

Definition at line 12 of file container.h.

Typedef Documentation

◆ vtype

typedef uintptr_t vtype

Definition at line 14 of file container.h.