diff options
Diffstat (limited to 'src/libsok/sok.h')
-rw-r--r-- | src/libsok/sok.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/libsok/sok.h b/src/libsok/sok.h index 7635ead..074fbf6 100644 --- a/src/libsok/sok.h +++ b/src/libsok/sok.h @@ -6,6 +6,7 @@ extern "C" { #endif /* __cplusplus */ #include <stdint.h> // uint16_t +#include <stddef.h> // size_t /*********/ /* types */ @@ -174,6 +175,32 @@ _Bool sok_ctx_walk( void * const ); +/*********/ +/* cache */ +/*********/ + +#define SOK_CACHE_DEFAULT_CAPACITY 1024 + +typedef struct { + uint64_t *vals; + size_t num_vals, capacity; +} sok_cache_t; + +_Bool sok_cache_init(sok_cache_t * const, const size_t); +void sok_cache_fini(sok_cache_t * const); + +_Bool sok_cache_has(const sok_cache_t * const, const sok_ctx_t * const); +_Bool sok_cache_add(sok_cache_t * const, const sok_ctx_t * const); + +/*********/ +/* solve */ +/*********/ + +_Bool sok_solve( + sok_ctx_t * const, + void (*on_error)(const char * const) +); + #ifdef __cplusplus }; #endif /* __cplusplus */ |