Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kassane/sieve-cache-cpp
A SIEVE cache implementation for C++
https://github.com/kassane/sieve-cache-cpp
cache-algorithm cpp sieve sieve-cache
Last synced: 21 days ago
JSON representation
A SIEVE cache implementation for C++
- Host: GitHub
- URL: https://github.com/kassane/sieve-cache-cpp
- Owner: kassane
- License: mit
- Created: 2024-05-19T12:31:14.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-08-15T13:31:24.000Z (3 months ago)
- Last Synced: 2024-10-05T15:58:45.045Z (about 1 month ago)
- Topics: cache-algorithm, cpp, sieve, sieve-cache
- Language: C++
- Homepage:
- Size: 30.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sieve Cache in C++ (header only)
A [SIEVE cache](https://cachemon.github.io/SIEVE-website/) implementation for C++. Based on [D implementation](https://github.com/kubo39/sieve-cache-d).
### How to Use
* Test on [godbolt](https://godbolt.org/z/fej9cM61j)
**or**
* Add in your `CMakeLists.txt`
```cmake
include(FetchContent)
FetchContent_Declare(
sieve
GIT_REPOSITORY "https://github.com/kassane/sieve-cache-cpp.git"
GIT_TAG main
)
set(BUILD_BENCH OFF)
set(BUILD_TESTS OFF)
FetchContent_GetProperties(sieve)
if(NOT sieve_POPULATED)
FetchContent_Populate(sieve)
endif()
set(SIEVE_PATH "${sieve_SOURCE_DIR}/include")add_executable(${PROJECT_NAME} "demo.cc")
target_include_directories(${PROJECT_NAME} PRIVATE ${SIEVE_PATH})
``````bash
$ cmake -B build
$ cmake --build build
# Run benchmark sample (if enabled)
$ cmake --build build --target bench
# Run unittest (if enabled)
$ cmake --build build --target unittest
```## LICENSE
See: [LICENSE](LICENSE)