template <typename value_type_>
struct expected Fields
value | value_type_ | |
|---|---|---|
status | status_t |
Ask your coding agent about this page, or add the docs server to it
curl -s 'https://www.unum.cloud/docs/usearch/cpp/introspection.md' | claude -p "How would this fit my code?"Read an index’s size, memory and the CPU and GPU classes dispatch picked, the kernels compiled in and runnable here, how much of the graph a search reaches, and how many entries share a key:
auto [description, status] = index.describe();
std::printf("%zu entries in %zu bytes\n", description.size, description.memory_usage);
std::printf("dispatched to %s and %s\n", usearch_cpu_class_name(description.cpu_class),
usearch_gpu_class_name(description.gpu_class));
std::printf("compiled for %s\n", usearch_capabilities_compiled());
std::printf("available here %s\n", usearch_capabilities_available());
auto [reachability, health_status] = index.health();
std::printf("%zu of %zu entries reachable\n", reachability.reachable, reachability.audited);
auto [entries, count_status] = index.count(key);
std::printf("%zu entries under the key\n", entries);describe reads the frozen metadata and the counters once each, so under concurrent insertions they may come from slightly different moments, and memory_usage excludes the executor’s scratch. health measures how much of the graph a search reaches from the root; entries it misses stay unfound until a refine re-links them.
expectedA call's value beside its status, bound natively as auto [value, status].template <typename value_type_>
struct expected value | value_type_ | |
|---|---|---|
status | status_t |
outputsWhere a call writes what value_type_ is made of.template <typename value_type_>
struct outputs value | value_type_ | The answer, which the call writes in place. |
|---|
outputs< void >A call that outputs nothing but its status.template <>
struct outputs< void > value | void | The answer, which the call writes in place. |
|---|
awaiterA deferred being awaited, living in the awaiting coroutine's frame: each poll reads the status word, and one not yet final posts itself again.template <typename value_type_,
a_scheduler scheduler_type_>
class awaiter ownerOwns one handle of handle_type_, which free_ releases, moving it and never copying it.template <typename handle_type_,
void(*)(handle_type_) free_>
class owner owningA handle owned, moved and never copied, whose verbs block on the calling thread.template <typename handle_type_,
void(*)(handle_type_) free_>
struct owning completion | usearch_completion_t |
|---|
caller_ownedA handle its caller owns and the executor its verbs run on, both valid while this lives, completing as completion_ says.template <typename handle_type_,
usearch_completion_t completion_>
struct caller_owned completion | usearch_completion_t |
|---|
planA long operation in flight behind handle_type_, which its verb opens on the first call naming it and continues on every later one, until the operation's finish consumes it.5template <typename handle_type_>
class plan Nothing finishes it on destruction: a dropped live plan leaks and keeps every handle it names closed to insertion and saving, as an unfinished plan does in C.
planoperator=phaseWhere the last call naming the plan stopped; usearch_phase_name spells its phase.usearch_phase_progress_t phase() const noexcept; handle_fieldThe lazy handle field a verb naming the plan opens, continues and leaves.handle_type_ * handle_field() noexcept; phase_fieldThe progress field a verb naming the plan writes where it stops.usearch_phase_progress_t * phase_field() noexcept; version_nameThe linked library's version, a release-candidate suffix included.std::string_view version_name() noexcept; handle_field_ofThe handle field of live, or nullptr when a call names no plan.template <typename handle_type_>
handle_type_ * handle_field_of(plan<handle_type_> *live) noexcept; phase_field_ofThe progress field of live, or nullptr when a call names no plan.template <typename handle_type_>
usearch_phase_progress_t * phase_field_of(
plan<handle_type_> *live) noexcept;