Data Structures | |
| struct | VectorRecord |
| The record of one vector, which its token names. More... | |
| struct | MemoriaVectorCfg |
| Arguments for every mmgr_vector_ entry, each reading only the members it needs. More... | |
| struct | MemoriaVectorNs |
| Type of the vector dispatch table. More... | |
Macros | |
| #define | MMGR_VECTOR_CHUNK_BYTES |
| Bytes of the buffer on the stack that a growth copies the elements through, which a build may set before it includes this header. | |
| #define | MMGR_VECTOR_CLAIM_BITS |
| Asserts that a growth copies at least one byte a chunk. | |
| #define | MMGR_VECTOR_CLAIM_WORDS(limit_) |
| The words of claim bits for a ceiling of limit_ elements. | |
| #define | MemoriaVector(name_, element_, limit_, owner_) |
| Declares a vector of element_ with a ceiling of limit_ elements, its cell counted to owner_. | |
| #define | MMGR_VECTOR_THROUGH(guard_) |
| The movable entries of a guard, as the members of a MemoriaVectorCfg. | |
Functions | |
| EMBED_HOST_DEVICE embed_bool | mmgr_vector_at (const MemoriaVectorCfg *args) |
| Copies the element at args->index to args->dst. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_vector_set (const MemoriaVectorCfg *args) |
| Copies the element at args->src to args->index. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_vector_push_back (const MemoriaVectorCfg *args) |
| Appends the element at args->src. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_vector_pop_back (const MemoriaVectorCfg *args) |
| Removes the last element and copies it to args->dst. | |
| EMBED_HOST_DEVICE size_t | mmgr_vector_size (const MemoriaVectorCfg *args) |
| Returns the count of elements. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_vector_release (const MemoriaVectorCfg *args) |
| Gives the cell of the vector back, and leaves the vector with no element. | |
Variables | |
| static const MemoriaVectorNs | memoria_vector |
| Dispatch table instance named memoria_vector, whose members are the mmgr_vector_ entries. | |
| #define MMGR_VECTOR_CHUNK_BYTES |
Bytes of the buffer on the stack that a growth copies the elements through, which a build may set before it includes this header.
Definition at line 47 of file memoria_vector.h.
| #define MMGR_VECTOR_CLAIM_BITS |
Asserts that a growth copies at least one byte a chunk.
The bits of one word of the claim bits of a vector: one an element.
Definition at line 54 of file memoria_vector.h.
| #define MMGR_VECTOR_CLAIM_WORDS | ( | limit_ | ) |
The words of claim bits for a ceiling of limit_ elements.
| [in] | limit_ | The ceiling of the capacity. |
Definition at line 62 of file memoria_vector.h.
| #define MemoriaVector | ( | name_, | |
| element_, | |||
| limit_, | |||
| owner_ ) |
Declares a vector of element_ with a ceiling of limit_ elements, its cell counted to owner_.
| [in] | name_ | The token of the vector: a const pointer to its record. |
| [in] | element_ | The type of one element. |
| [in] | limit_ | The ceiling of the capacity, a constant above 0. |
| [in] | owner_ | The identity of the owner that counts the cell, as MMGR_OWNERS declares it [BORROWS]. |
Definition at line 102 of file memoria_vector.h.
| #define MMGR_VECTOR_THROUGH | ( | guard_ | ) |
The movable entries of a guard, as the members of a MemoriaVectorCfg.
| [in] | guard_ | The guard of a cellblock with the movable option, MinimumSecurityGuard or MaxSecurityGuard. |
Definition at line 120 of file memoria_vector.h.
| EMBED_HOST_DEVICE embed_bool mmgr_vector_at | ( | const MemoriaVectorCfg * | args | ) |
Copies the element at args->index to args->dst.
| [in,out] | args | The vector, the guard, the index and dst [BORROWS]. |
References mmgr_vector_at().
Referenced by mmgr_vector_at().
| EMBED_HOST_DEVICE embed_bool mmgr_vector_set | ( | const MemoriaVectorCfg * | args | ) |
Copies the element at args->src to args->index.
| [in,out] | args | The vector, the guard, the index and src [BORROWS]. |
References mmgr_vector_set().
Referenced by mmgr_vector_set().
| EMBED_HOST_DEVICE embed_bool mmgr_vector_push_back | ( | const MemoriaVectorCfg * | args | ) |
Appends the element at args->src.
| [in,out] | args | The vector, the guard and src [BORROWS]. |
References mmgr_vector_push_back().
Referenced by mmgr_vector_push_back().
| EMBED_HOST_DEVICE embed_bool mmgr_vector_pop_back | ( | const MemoriaVectorCfg * | args | ) |
Removes the last element and copies it to args->dst.
| [in,out] | args | The vector, the guard and dst [BORROWS]. |
References mmgr_vector_pop_back().
Referenced by mmgr_vector_pop_back().
| EMBED_HOST_DEVICE size_t mmgr_vector_size | ( | const MemoriaVectorCfg * | args | ) |
Returns the count of elements.
| [in] | args | The vector [BORROWS]. |
References mmgr_vector_size().
Referenced by mmgr_vector_size().
| EMBED_HOST_DEVICE embed_bool mmgr_vector_release | ( | const MemoriaVectorCfg * | args | ) |
Gives the cell of the vector back, and leaves the vector with no element.
| [in,out] | args | The vector and the guard [BORROWS]. |
References mmgr_vector_release().
Referenced by mmgr_vector_release().
|
static |
Dispatch table instance named memoria_vector, whose members are the mmgr_vector_ entries.
Definition at line 237 of file memoria_vector.h.