% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/views.R
\name{view_gather}
\alias{view_gather}
\title{Create a gather (indexed) view over a shared matrix}
\usage{
view_gather(x, rows = NULL, cols)
}
\arguments{
\item{x}{A shared (share()d) atomic matrix (double/integer/logical/raw).}

\item{rows}{Row selector. NULL (all rows) or idx_range().}

\item{cols}{Integer vector of column indices (1-based).}
}
\value{
A \code{shard_view_gather} object describing the indexed column view.
}
\description{
Gather views describe non-contiguous column (or row) subsets without
allocating a slice-sized matrix. shard-aware kernels can then choose to
pack the requested indices into scratch explicitly (bounded and reportable)
or run gather-aware compute paths.
}
\details{
v1 note: only column-gather views are implemented (rows may be NULL or
idx_range()).
}
\examples{
\donttest{
m <- share(matrix(1:20, nrow = 4))
v <- view_gather(m, cols = c(1L, 3L))
}
}
