|
Reduct
v4.0.5-1-g4851deb
A functional and immutable language.
|
Data Structures | |
| struct | reduct_scratch_t |
| Scratch buffer structure. More... | |
| struct | reduct_scratch_local_t |
| Per-thread scratch-related state structure. More... | |
Macros | |
| #define | REDUCT_SCRATCH_INITIAL 128 |
| Initial scratch buffer size. | |
| #define | REDUCT_SCRATCH_MAX 16 |
| The maximum number of scratch buffers. | |
| #define | REDUCT_SCRATCH_GET(_reduct, _name, _type, _length) |
| Allocate a scratch buffer. | |
| #define | REDUCT_SCRATCH_GROW(_reduct, _name, _type, _length) |
| Grow an allocated scratch buffer, the current buffer must be the last one allocated. | |
| #define | REDUCT_SCRATCH_PUT(_reduct, _name) |
| Free a scratch buffer, the current buffer must be the last one allocated. | |
Functions | |
| REDUCT_API void | reduct_scratch_local_init (reduct_scratch_local_t *local) |
| Initialize a local scratch state. | |
| REDUCT_API void | reduct_scratch_local_deinit (reduct_scratch_local_t *local) |
| Deinitialize a local scratch state. | |
| #define REDUCT_SCRATCH_INITIAL 128 |
| #define REDUCT_SCRATCH_MAX 16 |
| #define REDUCT_SCRATCH_GET | ( | _reduct, | |
| _name, | |||
| _type, | |||
| _length | |||
| ) |
Allocate a scratch buffer.
| _reduct | Pointer to the Reduct structure. |
| _name | The name of the buffer pointer. |
| _type | The type of the elements. |
| _length | The number of elements of _type to reserve memory for. |
| #define REDUCT_SCRATCH_GROW | ( | _reduct, | |
| _name, | |||
| _type, | |||
| _length | |||
| ) |
Grow an allocated scratch buffer, the current buffer must be the last one allocated.
| _reduct | Pointer to the Reduct structure. |
| _name | The name of the buffer pointer. |
| _type | The type of the elements. |
| _length | The number of elements of _type to reserve memory for. |
| #define REDUCT_SCRATCH_PUT | ( | _reduct, | |
| _name | |||
| ) |
Free a scratch buffer, the current buffer must be the last one allocated.
| _reduct | Pointer to the Reduct structure. |
| _name | The name of the buffer pointer. |
| REDUCT_API void reduct_scratch_local_init | ( | reduct_scratch_local_t * | local | ) |
Initialize a local scratch state.
| local | Pointer to the local scratch state to initialize. |
| REDUCT_API void reduct_scratch_local_deinit | ( | reduct_scratch_local_t * | local | ) |
Deinitialize a local scratch state.
| local | Pointer to the local scratch state to deinitialize. |