> For the complete documentation index, see [llms.txt](https://devs.novanet.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://devs.novanet.xyz/jolt-atlas-zkml/onnx/tensor-instructions/miscellaneous/gather.md).

# Gather

The gather operator is a special memory operator: it reads `ts1` and `ts2` sources, computes addresses based on `ts1` addresses and `ts2` values, and then performs additional reads using those computed addresses. We need to account for this behaviour.

In the zkVM, we first check that the gather-read values are correct, then verify that the addresses are computed correctly from the `ts1` addresses and `ts2` values, and finally confirm that the gather reads match TdWrites.
