|
Lime Parser Generator 0.1.0
Runtime-extensible LALR(1) parser with SIMD tokenization and LLVM JIT
|
Manage a collection of active forks for parallel evaluation. More...
Data Structures | |
| struct | ParseForkSet |
| A set of active forks being evaluated in parallel. More... | |
Functions | |
| uint32_t | parse_fork_set_active_count (const ParseForkSet *set) |
| Return the number of forks still active. | |
| bool | parse_fork_set_add (ParseForkSet *set, ParseFork *fork) |
| Add a fork to the set. | |
| ParseFork * | parse_fork_set_best (const ParseForkSet *set) |
| Find the best completed fork. | |
| ParseForkSet * | parse_fork_set_create (uint32_t max_forks) |
| Create a fork set with the given maximum fork count. | |
| void | parse_fork_set_destroy (ParseForkSet *set) |
| Destroy a fork set and all forks it contains. | |
| uint32_t | parse_fork_set_prune (ParseForkSet *set) |
| Remove and destroy all failed or abandoned forks. | |
Manage a collection of active forks for parallel evaluation.
| uint32_t parse_fork_set_active_count | ( | const ParseForkSet * | set | ) |
#include <include/parser_fork.h>
Return the number of forks still active.
Counts forks in FORK_PENDING or FORK_RUNNING state.
| set | Fork set to query. |
| bool parse_fork_set_add | ( | ParseForkSet * | set, |
| ParseFork * | fork | ||
| ) |
#include <include/parser_fork.h>
Add a fork to the set.
The set takes ownership of the fork.
| set | Fork set to add to. |
| fork | Fork to add. |
| true | Fork was added. |
| false | Set is at capacity. |
| ParseFork * parse_fork_set_best | ( | const ParseForkSet * | set | ) |
#include <include/parser_fork.h>
Find the best completed fork.
Returns the fork with the lowest priority among those with FORK_COMPLETED status.
| set | Fork set to search. |
| ParseForkSet * parse_fork_set_create | ( | uint32_t | max_forks | ) |
#include <include/parser_fork.h>
Create a fork set with the given maximum fork count.
| max_forks | Maximum number of forks allowed (0 = unlimited). |
| void parse_fork_set_destroy | ( | ParseForkSet * | set | ) |
#include <include/parser_fork.h>
Destroy a fork set and all forks it contains.
| set | Fork set to destroy. Passing NULL is safe. |
| uint32_t parse_fork_set_prune | ( | ParseForkSet * | set | ) |
#include <include/parser_fork.h>
Remove and destroy all failed or abandoned forks.
Removes forks with FORK_FAILED or FORK_ABANDONED status.
| set | Fork set to prune. |