Data Structures | |
| struct | CatenaFinitaCfg |
| Arguments for the string calls, where each call reads only the members it needs. More... | |
| struct | VerboProgrediorCfg |
| Arguments for the single-step compares used to drive a walk. More... | |
| struct | TransfiguroCfg |
| Arguments for the conversions from text to number. More... | |
| struct | CellularumLaboroNs |
| Type of the cellul dispatch table. More... | |
Macros | |
| #define | MMGR_SIEVE_ROWS |
| Max needle offsets the search sieve tests per candidate word. | |
| #define | MMGR_FIND_CHAIN_MAX |
| Longest haystack over which a mask chain, and not a sieve, settles a one or two byte needle. | |
Functions | |
| EMBED_HOST_DEVICE CatenaFinitaCfg | mmgr_cellul_init (const CatenaFinitaCfg *args) |
| Returns a copy of the argument struct. | |
| EMBED_HOST_DEVICE size_t | mmgr_cellul_len (const CatenaFinitaCfg *args) |
| Returns the bytes in src before its terminator, from args->at on. | |
| EMBED_HOST_DEVICE size_t | mmgr_cellul_diff (const CatenaFinitaCfg *args) |
| Returns the offset of the first byte where src and other differ. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_cellul_eq (const CatenaFinitaCfg *args) |
| Reports whether src and other hold the same terminated string. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_cellul_starts (const CatenaFinitaCfg *args) |
| Reports whether src begins with other. | |
| EMBED_HOST_DEVICE const char * | mmgr_cellul_find (const CatenaFinitaCfg *args) |
| Finds the first occurrence of other within src. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_cellul_has (const CatenaFinitaCfg *args) |
| Reports whether other occurs within src. | |
| EMBED_HOST_DEVICE const char * | mmgr_cellul_chr (const CatenaFinitaCfg *args) |
| Finds the first occurrence of args->byte in src, before the terminator. | |
| EMBED_HOST_DEVICE size_t | mmgr_cellul_copy (const CatenaFinitaCfg *args) |
| Copies src into dst, and writes at max cap bytes, the terminator among them. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_cellul_ws (const CatenaFinitaCfg *args) |
| Tests src[at] for whitespace. | |
| EMBED_HOST_DEVICE embed_bool | mmgr_cellul_digit (const CatenaFinitaCfg *args) |
| Tests src[at] for a decimal digit. | |
| EMBED_HOST_DEVICE embed_iword | mmgr_cellul_step_word (const VerboProgrediorCfg *args) |
| Compares one word pair and reports whether a walk should continue. | |
| EMBED_HOST_DEVICE embed_iword | mmgr_cellul_step_byte (const VerboProgrediorCfg *args) |
| Compares one byte pair and reports whether a walk should continue. | |
| EMBED_HOST_DEVICE embed_iword | mmgr_cellul_to_long (const TransfiguroCfg *args) |
| Reads a signed decimal integer from args->src. | |
| EMBED_HOST_DEVICE embed_word | mmgr_cellul_to_ulong (const TransfiguroCfg *args) |
| Reads an unsigned decimal integer from args->src. | |
| EMBED_HOST_DEVICE double | mmgr_cellul_to_double (const TransfiguroCfg *args) |
| Reads a decimal floating point number from args->src. | |
| EMBED_HOST_DEVICE float | mmgr_cellul_to_float (const TransfiguroCfg *args) |
| Reads a decimal floating point number from args->src and narrows it to float. | |
| EMBED_HOST_DEVICE embed_word | mmgr_cellul_to_ulong_in (const TransfiguroCfg *args) |
| Reads an unsigned integer in base args->base from args->src. | |
| EMBED_HOST_DEVICE size_t | mmgr_cellul_span (const CatenaFinitaCfg *args) |
| Counts the bytes at the start of src that the set other holds. | |
| EMBED_HOST_DEVICE size_t | mmgr_cellul_span_not (const CatenaFinitaCfg *args) |
| Counts the bytes at the start of src that the set other does not hold. | |
| EMBED_HOST_DEVICE const char * | mmgr_cellul_chr_last (const CatenaFinitaCfg *args) |
| Finds the last occurrence of args->byte in src, before the terminator. | |
| EMBED_HOST_DEVICE size_t | mmgr_cellul_span_last (const CatenaFinitaCfg *args) |
| Counts the bytes at the end of src's cap bytes that the set other holds. | |
| EMBED_HOST_DEVICE size_t | mmgr_cellul_span_not_last (const CatenaFinitaCfg *args) |
| Counts the bytes at the end of src's cap bytes that the set other does not hold. | |
Variables | |
| static const CellularumLaboroNs | cellul |
| Dispatch table instance named cellul, with each member set to its mmgr_cellul_ function. | |
| #define MMGR_SIEVE_ROWS |
Max needle offsets the search sieve tests per candidate word.
Definition at line 52 of file cellularum_laboro.h.
| #define MMGR_FIND_CHAIN_MAX |
Longest haystack over which a mask chain, and not a sieve, settles a one or two byte needle.
n 8 64 2048 Xtensa chain 124 489 13391 Xtensa sieve 187 607 15494 RISC-V chain 124 488 13393 RISC-V sieve 219 680 17059
The chain wins at every length on both parts, and so the default is no limit. The knob stays because that is a measurement and not a proof. A part or a workload that disagrees can say so and leave the walk alone.
Definition at line 83 of file cellularum_laboro.h.
| EMBED_HOST_DEVICE CatenaFinitaCfg mmgr_cellul_init | ( | const CatenaFinitaCfg * | args | ) |
Returns a copy of the argument struct.
| [in] | args | Struct to copy [BORROWS]. |
References mmgr_cellul_init().
Referenced by mmgr_cellul_init().
| EMBED_HOST_DEVICE size_t mmgr_cellul_len | ( | const CatenaFinitaCfg * | args | ) |
Returns the bytes in src before its terminator, from args->at on.
| [in] | args | Bytes src, the extent cap, and the start offset at [BORROWS]. |
References mmgr_cellul_len().
Referenced by mmgr_cellul_len().
| EMBED_HOST_DEVICE size_t mmgr_cellul_diff | ( | const CatenaFinitaCfg * | args | ) |
Returns the offset of the first byte where src and other differ.
| [in] | args | Bytes src and other, the extent cap, and ci [BORROWS]. |
References mmgr_cellul_diff().
Referenced by mmgr_cellul_diff().
| EMBED_HOST_DEVICE embed_bool mmgr_cellul_eq | ( | const CatenaFinitaCfg * | args | ) |
Reports whether src and other hold the same terminated string.
| [in] | args | Bytes src and other, the extent cap, and ci [BORROWS]. |
References mmgr_cellul_eq().
Referenced by mmgr_cellul_eq().
| EMBED_HOST_DEVICE embed_bool mmgr_cellul_starts | ( | const CatenaFinitaCfg * | args | ) |
Reports whether src begins with other.
| [in] | args | Bytes src and other, the extent cap, and ci [BORROWS]. |
References mmgr_cellul_starts().
Referenced by mmgr_cellul_starts().
| EMBED_HOST_DEVICE const char * mmgr_cellul_find | ( | const CatenaFinitaCfg * | args | ) |
Finds the first occurrence of other within src.
| [in] | args | Haystack src with cap, needle other with other_cap, and ci [BORROWS]. |
References mmgr_cellul_find().
Referenced by mmgr_cellul_find().
| EMBED_HOST_DEVICE embed_bool mmgr_cellul_has | ( | const CatenaFinitaCfg * | args | ) |
Reports whether other occurs within src.
| [in] | args | Haystack src with cap, needle other with other_cap, and ci [BORROWS]. |
References mmgr_cellul_has().
Referenced by mmgr_cellul_has().
| EMBED_HOST_DEVICE const char * mmgr_cellul_chr | ( | const CatenaFinitaCfg * | args | ) |
Finds the first occurrence of args->byte in src, before the terminator.
| [in] | args | Bytes src, the extent cap, and the byte sought [BORROWS]. |
References mmgr_cellul_chr().
Referenced by mmgr_cellul_chr().
| EMBED_HOST_DEVICE size_t mmgr_cellul_copy | ( | const CatenaFinitaCfg * | args | ) |
Copies src into dst, and writes at max cap bytes, the terminator among them.
| [in,out] | args | Source src, destination dst, and the destination extent cap [BORROWS]. |
References mmgr_cellul_copy().
Referenced by mmgr_cellul_copy().
| EMBED_HOST_DEVICE embed_bool mmgr_cellul_ws | ( | const CatenaFinitaCfg * | args | ) |
Tests src[at] for whitespace.
| [in] | args | Bytes src and the offset at [BORROWS]. |
References mmgr_cellul_ws().
Referenced by mmgr_cellul_ws().
| EMBED_HOST_DEVICE embed_bool mmgr_cellul_digit | ( | const CatenaFinitaCfg * | args | ) |
Tests src[at] for a decimal digit.
| [in] | args | Bytes src and the offset at [BORROWS]. |
References mmgr_cellul_digit().
Referenced by mmgr_cellul_digit().
| EMBED_HOST_DEVICE embed_iword mmgr_cellul_step_word | ( | const VerboProgrediorCfg * | args | ) |
Compares one word pair and reports whether a walk should continue.
| [in] | args | Words word_left and word_right, with ci and end_wins [BORROWS]. |
References mmgr_cellul_step_word().
Referenced by mmgr_cellul_step_word().
| EMBED_HOST_DEVICE embed_iword mmgr_cellul_step_byte | ( | const VerboProgrediorCfg * | args | ) |
Compares one byte pair and reports whether a walk should continue.
| [in] | args | Bytes byte_left and byte_right, with ci and end_wins [BORROWS]. |
References mmgr_cellul_step_byte().
Referenced by mmgr_cellul_step_byte().
| EMBED_HOST_DEVICE embed_iword mmgr_cellul_to_long | ( | const TransfiguroCfg * | args | ) |
Reads a signed decimal integer from args->src.
| [in,out] | args | Text src and the optional end target [BORROWS]. |
References mmgr_cellul_to_long().
Referenced by mmgr_cellul_to_long().
| EMBED_HOST_DEVICE embed_word mmgr_cellul_to_ulong | ( | const TransfiguroCfg * | args | ) |
Reads an unsigned decimal integer from args->src.
| [in,out] | args | Text src and the optional end target [BORROWS]. |
References mmgr_cellul_to_ulong().
Referenced by mmgr_cellul_to_ulong().
| EMBED_HOST_DEVICE double mmgr_cellul_to_double | ( | const TransfiguroCfg * | args | ) |
Reads a decimal floating point number from args->src.
| [in,out] | args | Text src and the optional end target [BORROWS]. |
References mmgr_cellul_to_double().
Referenced by mmgr_cellul_to_double().
| EMBED_HOST_DEVICE float mmgr_cellul_to_float | ( | const TransfiguroCfg * | args | ) |
Reads a decimal floating point number from args->src and narrows it to float.
| [in,out] | args | Text src and the optional end target [BORROWS]. |
References mmgr_cellul_to_float().
Referenced by mmgr_cellul_to_float().
| EMBED_HOST_DEVICE embed_word mmgr_cellul_to_ulong_in | ( | const TransfiguroCfg * | args | ) |
Reads an unsigned integer in base args->base from args->src.
| [in,out] | args | Text src, the optional end target and the base [BORROWS]. |
References mmgr_cellul_to_ulong_in().
Referenced by mmgr_cellul_to_ulong_in().
| EMBED_HOST_DEVICE size_t mmgr_cellul_span | ( | const CatenaFinitaCfg * | args | ) |
Counts the bytes at the start of src that the set other holds.
| [in] | args | Bytes src, the extent cap, and the terminated set other [BORROWS]. |
References mmgr_cellul_span().
Referenced by mmgr_cellul_span().
| EMBED_HOST_DEVICE size_t mmgr_cellul_span_not | ( | const CatenaFinitaCfg * | args | ) |
Counts the bytes at the start of src that the set other does not hold.
| [in] | args | Bytes src, the extent cap, and the terminated set other [BORROWS]. |
References mmgr_cellul_span_not().
Referenced by mmgr_cellul_span_not().
| EMBED_HOST_DEVICE const char * mmgr_cellul_chr_last | ( | const CatenaFinitaCfg * | args | ) |
Finds the last occurrence of args->byte in src, before the terminator.
| [in] | args | Bytes src, the extent cap, and the byte sought [BORROWS]. |
References mmgr_cellul_chr_last().
Referenced by mmgr_cellul_chr_last().
| EMBED_HOST_DEVICE size_t mmgr_cellul_span_last | ( | const CatenaFinitaCfg * | args | ) |
Counts the bytes at the end of src's cap bytes that the set other holds.
| [in] | args | Bytes src, the extent cap, and the terminated set other [BORROWS]. |
References mmgr_cellul_span_last().
Referenced by mmgr_cellul_span_last().
| EMBED_HOST_DEVICE size_t mmgr_cellul_span_not_last | ( | const CatenaFinitaCfg * | args | ) |
Counts the bytes at the end of src's cap bytes that the set other does not hold.
| [in] | args | Bytes src, the extent cap, and the terminated set other [BORROWS]. |
References mmgr_cellul_span_not_last().
Referenced by mmgr_cellul_span_not_last().
|
static |
Dispatch table instance named cellul, with each member set to its mmgr_cellul_ function.
Definition at line 422 of file cellularum_laboro.h.