Core types to define data descriptors.
More...
Core types to define data descriptors.
◆ _NM_DATA_CONTENT_SIZE
| #define _NM_DATA_CONTENT_SIZE 64 |
maximum size of content descriptor for nm_data
Definition at line 74 of file nm_data.h.
◆ _NM_DATA_GENERATOR_SIZE
| #define _NM_DATA_GENERATOR_SIZE 64 |
maximum content size for generators
Definition at line 76 of file nm_data.h.
◆ NM_DATA_CHUNK_NULL
◆ nm_data_generator_default_destroy
◆ nm_data_generator_default_init
◆ nm_data_generator_default_next
◆ NM_DATA_TYPE
| #define NM_DATA_TYPE |
( |
|
ENAME, |
|
|
|
CONTENT_TYPE, |
|
|
|
OPS |
|
) |
| |
macro to generate typed functions to init/access data fields.
- Parameters
-
| ENAME | is the base name used to build symbols (must be a valid C token) |
| CONTENT_TYPE | is the iterator internal state |
| OPS | is a collection of operations of type nm_data_ops_s for the given type. At least nm_data_ops_s::p_traversal field must be non-NULL; other fields may be NULL and will be filled with default values. |
- Examples
- nm_sr_custom_data.c.
Definition at line 240 of file nm_data.h.
◆ NM_DATA_USE_COROUTINE_GENERATOR
| #define NM_DATA_USE_COROUTINE_GENERATOR |
whether to use coroutine-based generators
Definition at line 83 of file nm_data.h.
◆ NM_DATA_USE_COROUTINE_SLICER
| #define NM_DATA_USE_COROUTINE_SLICER |
whether to use coroutine-based slicers
Definition at line 85 of file nm_data.h.
◆ NM_DATAV_INIT_SIZE
| #define NM_DATAV_INIT_SIZE 4 |
initial size of an nm_datav
Definition at line 282 of file nm_data.h.
◆ nm_data_apply_t
| typedef void(* nm_data_apply_t) (void *ptr, nm_len_t len, void *_context) |
◆ nm_data_generator_destroy_t
| typedef void(* nm_data_generator_destroy_t) (const struct nm_data_s *p_data, void *_generator) |
destroys resources allocated by generator
Definition at line 138 of file nm_data.h.
◆ nm_data_generator_init_t
| typedef void(* nm_data_generator_init_t) (const struct nm_data_s *p_data, void *_generator) |
initializes a generator (i.e.
semi-coroutine) for the given data type
Definition at line 118 of file nm_data.h.
◆ nm_data_generator_next_t
returns next data chunk for the given generator.
_content and _generator must be consistent accross calls no error checking is done
Definition at line 126 of file nm_data.h.
◆ nm_data_properties_compute_t
| typedef void(* nm_data_properties_compute_t) (struct nm_data_s *p_data) |
function to compute data properties
Definition at line 177 of file nm_data.h.
◆ nm_data_traversal_t
| typedef void(* nm_data_traversal_t) (const void *_content, const nm_data_apply_t apply, void *_context) |
funtion to traverse data with app layout, i.e.
='map' functional operation
- Parameters
-
| _content | content description of data type |
| apply | function to apply to all chunks |
| _context | context pointer given to apply function |
Definition at line 108 of file nm_data.h.
◆ nm_data_chunk_isnull()
◆ nm_data_default_properties_compute()
| void nm_data_default_properties_compute |
( |
struct nm_data_s * |
p_data | ) |
|
compute data properties; not for enduser, exported for use by inline function
◆ nm_data_generator_coroutine_destroy()
| void nm_data_generator_coroutine_destroy |
( |
const struct nm_data_s * |
p_data, |
|
|
void * |
_generator |
|
) |
| |
◆ nm_data_generator_coroutine_init()
| void nm_data_generator_coroutine_init |
( |
const struct nm_data_s * |
p_data, |
|
|
void * |
_generator |
|
) |
| |
◆ nm_data_generator_coroutine_next()
◆ nm_data_generator_generic_init()
| void nm_data_generator_generic_init |
( |
const struct nm_data_s * |
p_data, |
|
|
void * |
_generator |
|
) |
| |
◆ nm_data_generator_generic_next()
◆ nm_data_propertie_gpu_postinit()
post-init GPU part of data properties: check that p_properties_compute function actually filled the GPU part.
Definition at line 216 of file nm_data.h.
References NM_FATAL.
◆ nm_data_propertie_gpu_preinit()
pre-init GPU part of data properties
Definition at line 203 of file nm_data.h.
◆ nm_datav_add_chunk()
| static void nm_datav_add_chunk |
( |
struct nm_datav_s * |
p_datav, |
|
|
const void * |
ptr, |
|
|
nm_len_t |
len |
|
) |
| |
|
inlinestatic |
◆ nm_datav_add_chunk_data()
| static void nm_datav_add_chunk_data |
( |
struct nm_datav_s * |
p_datav, |
|
|
const struct nm_data_s * |
p_data |
|
) |
| |
|
inlinestatic |
◆ nm_datav_destroy()
| static void nm_datav_destroy |
( |
struct nm_datav_s * |
p_datav | ) |
|
|
inlinestatic |
◆ nm_datav_init()
| static void nm_datav_init |
( |
struct nm_datav_s * |
p_datav | ) |
|
|
inlinestatic |
◆ nm_datav_size()
◆ nm_datav_uncommit()
| static void nm_datav_uncommit |
( |
struct nm_datav_s * |
p_datav | ) |
|
|
inlinestatic |