Lifecycle functions#
set_cache_dir#
-
int set_cache_dir(const char *dir) noexcept#
Sets the cache directory to use in
prepare_log_sigwhenuse_disk=true. If the cache directory is unset, a default directory will be used. This function is not thread safe.- Parameters:
dir – Cache directory
- Returns:
Status code (0 = success).
clear_cache#
-
int clear_cache(bool use_disk = false) noexcept#
Clear the log signature cache generated by
prepare_log_sig. This function is not thread safe.- Parameters:
use_disk – If
false, will clear the cache from memory only. Iftrue, will also clear the cache directory.- Returns:
Status code (0 = success).
cpsig_shutdown#
-
void cpsig_shutdown() noexcept#
Release all in-memory cpsig caches. Idempotent; subsequent calls lazily re-populate.
Citation#
If you found this library useful in your research, please consider citing the paper:
@article{shmelev2025pysiglib,
title={pySigLib-Fast Signature-Based Computations on CPU and GPU},
author={Shmelev, Daniil and Salvi, Cristopher},
journal={arXiv preprint arXiv:2509.10613},
year={2025}
}