# Residency

> USearch for Go

Where the payload lives is the constructor's name, as in the C lifecycle verbs, so a residency an index lacks has no constructor to call.
Each takes only the placement its own hardware has, one shard per entry, and an empty list derives it.

```go
inRam, err := usearch.DenseInitRam(options, []int32{0, 1})        // one graph per socket
inVram, err := usearch.DenseInitVram(options, []int32{0, 1, 2, 3}) // sharded, never replicated
onGpu, err := usearch.DenseLoadVram("index.safegraphs", &usearch.DenseLoadVramConfig{Devices: []int32{0}})
```

An NVMe index is only ever viewed: external-memory graphs are never modified in place.

`import "github.com/unum-cloud/USearch/golang"`

## Residency

Residency is where a handle keeps its payload, and where an executor computes and places the arenas it makes.

```go
type Residency int32
```

- `ResidencyRam`: ResidencyRam is volatile host memory, traversed by CPU threads.
- `ResidencyVram`: ResidencyVram is accelerator memory, traversed by GPU warps on a chosen device.
- `ResidencyNvme`: ResidencyNvme is persisted storage, traversed through pluggable I/O engines and sized past RAM.

## String

String renders the residency as the library spells it.

```go
func (residency Residency) String() string
```

