Spans over a caller's buffer, the two span types, and the spat dispatch table. More...
#include "mmgr.h"Go to the source code of this file.
Data Structures | |
| struct | mmgr_span |
| A buffer under fill: its bytes, how far the writer went, and whether it ran out. More... | |
| struct | mmgr_cspan |
| A buffer under read: its bytes, how far the reader went, and whether it ran out. More... | |
| struct | SpatiumCfg |
| Arguments for every spat call, where each call reads only the members it needs. More... | |
| struct | SpatiumNs |
| Type of the spat dispatch table. More... | |
Functions | |
| EMBED_HOST_DEVICE mmgr_span | mmgr_spat_from (const SpatiumCfg *args) |
| Builds a fill span over args->buf, with pos at 0 and overflow clear. | |
| EMBED_HOST_DEVICE mmgr_cspan | mmgr_spat_cfrom (const SpatiumCfg *args) |
| Builds a read span over args->cbuf, with pos at 0 and err clear. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_spat_ok (const SpatiumCfg *args) |
| Returns whether args->span has storage and has not overflowed. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_spat_cok (const SpatiumCfg *args) |
| Returns whether args->cspan has storage and recorded no error. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_spat_has_storage (const SpatiumCfg *args) |
| Returns whether args->span covers any bytes at all. | |
| EMBED_HOST_DEVICE void | mmgr_spat_reset (const SpatiumCfg *args) |
| Returns the span at args->at to its start and clears its overflow. | |
| EMBED_HOST_DEVICE mmgr_span | mmgr_spat_after (const SpatiumCfg *args) |
| Returns the span that begins args->count bytes into args->span. | |
| EMBED_HOST_DEVICE mmgr_span | mmgr_spat_first (const SpatiumCfg *args) |
| Returns the span that covers only the first args->count bytes of args->span. | |
| EMBED_HOST_DEVICE mmgr_cspan | mmgr_spat_produced (const SpatiumCfg *args) |
| Returns a read span over everything written into args->span. | |
| EMBED_HOST_DEVICE mmgr_cspan | mmgr_spat_read (const SpatiumCfg *args) |
| Returns a read span over the first args->count bytes written into args->span. | |
Variables | |
| static const SpatiumNs | spat |
| Dispatch table instance named spat, with each member set to its mmgr_spat_ function. | |
Spans over a caller's buffer, the two span types, and the spat dispatch table.
Definition in file spatium.h.