def index

bendtorch-core@0.1.0.0 · src/tensor/gather.bend:61

import bendtorch-core@0.1.0.0/src/tensor/gather.bend as Gather
import Base
import bendtorch-core@0.1.0.0/src/shape/core.bend as Shape

61# An Index from an index tensor's dimensions and entries, refused as a tensor
62# of those dimensions is: past rank 4 (RankExceeded, 1) or 2^20 elements
63# (CapacityExceeded, 2). Its entry count is checked by gather.
64def index(+dimensions: List<&2, U32>, +entries: List<&2, U32>) -> Result<&2, &2, Error, Index>:
65  built_index(entries, dimensions, Shape.construct(dimensions))

Uses (7)

Used by (1)