Template Function treeweave::guru::gather

Function Documentation

template<std::ranges::contiguous_range Packed, std::ranges::contiguous_range Out>
void treeweave::guru::gather(std::span<const std::uint32_t> rank, Packed &&packed, Out &&out)

out[i] = packed[rank[i]] — the writeback that restores caller order (thrust::gather-exact semantics: rank is the map into packed). Owns the software prefetch of packed[rank[i + 32]] (the batch pipeline’s Function::kLookahead distance), worthwhile on gathered reads. Call once per output component on SoA layouts.