# Retrieval and Streaming

> USearch for C++

`#include <usearch/dense_index.hpp>`

## dense_cursor_t

Owns one cursor, opened by `[dense_index_t::cursor_init](https://www.unum.cloud/docs/usearch/cpp/metrics.md#cursor_init)`.

```cpp
class dense_cursor_t
```

## dense_search_stream_t

Owns one search stream, opened by `[dense_index_t::search_stream_init](https://www.unum.cloud/docs/usearch/cpp/metrics.md#search_stream_init)`.

```cpp
class dense_search_stream_t
```

## Overview

Every verb takes the library's argument struct, so the caller names the inputs with designated initializers. The wrapper fills the handle, executor, arena and outcome slots, runs the call to completion, and returns the verb's first output beside the outcome, while any further output stays a pointer the caller sets in the struct.

```
namespace us = unum::usearch;
auto [executor, executor_status, executor_message] = us::executor_t::for_ram();
auto [index, index_status, index_message] = us::dense_index_t::init_ram({
    .metric = usearch_dense_metric_angular_k, .quantization = usearch_scalar_bf16_k,
    .dimensions = 256});
auto [arena, arena_status, arena_message] = us::arena_t::make({.executor = executor.handle()});
auto [matches, status, message] = index.search(
    {.count = 1, .queries = {query, 0, 256, usearch_scalar_f32_k}, .wanted = 10}, arena,
    executor);
```

