C

USearch for C

cmake -B build_release -D CMAKE_BUILD_TYPE=Release -D USEARCH_BUILD_SHARED=1 -D USEARCH_DENSE_DTYPES=11 && cmake --build build_release --config Release 3.0.0-rc.1 · 4c3e5023

Building the library takes CMake 3.28 and a C++20 compiler, while calling it takes any C99 compiler. It exposes all four modalities, each served by the engine in RAM, on NVMe and on NVIDIA GPUs; -D USEARCH_BUILD_STUB=1 adds a brute-force stand-in under the same names.

Topics

InstallationThat leaves both libraries in buildrelease/, carrying all eleven dense storage types; precompiled ones ship on the releases page.
QuickstartEvery verb takes one argument struct, initialized by designator, so every field left out keeps its default.
Executors11An executor owns the threads or device streams that run calls, the traversal scratch they walk with, and the pinned bounce buffer staging passes through.
Keys3A usearchkeyt is sixteen opaque bytes, enough for a UUID, a content hash, or a 64-bit integer with room to spare, and spelled canonically as a lowercase dashed UUID.
Inputs and Outputs31Every output whose length scales with the call lands in an arena: the matches of a search, every vector stored under one key, every pair a sparse product scored, a monolith, a cursor's batch.
Metrics9A dense index holds fixed-width vectors under one metric, with the dimensions, quantization, connectivity and valuesperkey its constructor froze.
Residency22
Serialization39Checkpoints ride the SafeGraphs interchange format, and the path's extension picks the layout: a .safegraphs path is one monolith of every shard, a .safegraphs.json path is a manifest beside one monolith per shard.
Filtered Search7Sometimes you may want to cross-reference search results against some external database or filter them by some criteria.
Refinement25usearchdenserefine re-selects the neighbors of every stored entry against the finished graph, improving those chosen while the graph around them was incomplete.
Linear Algebra5usearchdensemultiply is an approximate $A \times B^T$ in the shape of BLAS ?GEMM, with the indexed rows as $B$, reporting every pair the walks scored rather than only the nearest.
Retrieval and Streaming22usearchdenseget writes every vector stored under one key into an arena, shard by shard and in insertion order within each, as the Arenas example shows; an absent key leaves vectors->data NULL.
Introspection23
Errors2The library never logs or aborts: every failure is a status in the call's usearchoutcomet, with a static message carrying the detail the status cannot.
Platform Notes5A sequence index searches byte strings, UTF-8 text, DNA, RNA and proteins under edit distances and alignments, in RAM only.