hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
cf_vector.h File Reference
#include <pthread.h>
#include <stdint.h>
#include "citrusleaf/cf_base_types.h"
Include dependency graph for cf_vector.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  cf_vector_s

Macros

#define VECTOR_ELEM_SZ(_v)   ( _h->value_len )
#define VECTOR_FLAG_BIGLOCK   0x01
#define VECTOR_FLAG_INITZERO   0x02
#define VECTOR_FLAG_BIGRESIZE   0x04
#define VECTOR_REDUCE_DELETE   (1)
#define cf_vector_define(__x, __value_len, __flags)   uint8_t cf_vector##__x[1024]; cf_vector __x; cf_vector_init_smalloc(&__x, __value_len, cf_vector##__x, sizeof(cf_vector##__x), __flags);
#define cf_vector_define_clone(__source, __target)   uint8_t cf_vector##__target[__source.len]; cf_vector __target; cf_vector_clone_stack(&__source, &__target, cf_vector##__target);
#define cf_vector_reset(__v)   (__v)->len = 0; if ( (__v)->flags & VECTOR_FLAG_INITZERO) memset( (__v)->vector, 0, (__v)->alloc_len * (__v)->value_len);

Typedefs

typedef struct cf_vector_s cf_vector

Functions

cf_vectorcf_vector_create (uint32_t value_len, uint32_t init_sz, unsigned int flags)
int cf_vector_init (cf_vector *v, uint32_t value_len, uint32_t init_sz, unsigned int flags)
void cf_vector_init_smalloc (cf_vector *v, uint32_t value_len, uint8_t *sbuf, int sbuf_sz, unsigned int flags)
void cf_vector_clone_stack (cf_vector *source, cf_vector *target, uint8_t *target_buf)
int cf_vector_set (cf_vector *v, uint32_t index, void *value)
int cf_vector_get (cf_vector *v, uint32_t index, void *value)
void * cf_vector_getp (cf_vector *v, uint32_t index)
void * cf_vector_getp_vlock (cf_vector *v, uint32_t index, pthread_mutex_t **vlock)
int cf_vector_append (cf_vector *v, void *value)
int cf_vector_append_unique (cf_vector *v, void *value)
int cf_vector_delete (cf_vector *v, uint32_t index)
int cf_vector_delete_range (cf_vector *v, uint32_t start_index, uint32_t end_index)
void cf_vector_compact (cf_vector *v)
void cf_vector_destroy (cf_vector *v)

Macro Definition Documentation

#define cf_vector_define (   __x,
  __value_len,
  __flags 
)    uint8_t cf_vector##__x[1024]; cf_vector __x; cf_vector_init_smalloc(&__x, __value_len, cf_vector##__x, sizeof(cf_vector##__x), __flags);

Definition at line 66 of file cf_vector.h.

#define cf_vector_define_clone (   __source,
  __target 
)    uint8_t cf_vector##__target[__source.len]; cf_vector __target; cf_vector_clone_stack(&__source, &__target, cf_vector##__target);

Definition at line 72 of file cf_vector.h.

#define cf_vector_reset (   __v)    (__v)->len = 0; if ( (__v)->flags & VECTOR_FLAG_INITZERO) memset( (__v)->vector, 0, (__v)->alloc_len * (__v)->value_len);

Definition at line 85 of file cf_vector.h.

#define VECTOR_ELEM_SZ (   _v)    ( _h->value_len )

Definition at line 41 of file cf_vector.h.

#define VECTOR_FLAG_BIGLOCK   0x01

Definition at line 43 of file cf_vector.h.

#define VECTOR_FLAG_BIGRESIZE   0x04

Definition at line 45 of file cf_vector.h.

#define VECTOR_FLAG_INITZERO   0x02

Definition at line 44 of file cf_vector.h.

#define VECTOR_REDUCE_DELETE   (1)

Definition at line 46 of file cf_vector.h.

Typedef Documentation

typedef struct cf_vector_s cf_vector

Function Documentation

int cf_vector_append ( cf_vector v,
void *  value 
)
int cf_vector_append_unique ( cf_vector v,
void *  value 
)
void cf_vector_clone_stack ( cf_vector source,
cf_vector target,
uint8_t *  target_buf 
)
void cf_vector_compact ( cf_vector v)
cf_vector* cf_vector_create ( uint32_t  value_len,
uint32_t  init_sz,
unsigned int  flags 
)
int cf_vector_delete ( cf_vector v,
uint32_t  index 
)
int cf_vector_delete_range ( cf_vector v,
uint32_t  start_index,
uint32_t  end_index 
)
void cf_vector_destroy ( cf_vector v)
int cf_vector_get ( cf_vector v,
uint32_t  index,
void *  value 
)
void* cf_vector_getp ( cf_vector v,
uint32_t  index 
)
void* cf_vector_getp_vlock ( cf_vector v,
uint32_t  index,
pthread_mutex_t **  vlock 
)
int cf_vector_init ( cf_vector v,
uint32_t  value_len,
uint32_t  init_sz,
unsigned int  flags 
)
void cf_vector_init_smalloc ( cf_vector v,
uint32_t  value_len,
uint8_t *  sbuf,
int  sbuf_sz,
unsigned int  flags 
)
int cf_vector_set ( cf_vector v,
uint32_t  index,
void *  value 
)