Iterators
Procs
proc atIndexMut[T](t: var Tensor[T]; idx: varargs[int]; val: T) {.noSideEffect, inline.}
- Set the value at input coordinates This used to be []= before slicing was implemented Source Edit
proc getContiguousIndex[T](t: Tensor[T]; idx: int): int {.noSideEffect, inline.}
- Source Edit
proc getIndex[T](t: Tensor[T]; idx: varargs[int]): int {.noSideEffect, inline.}
- Convert i, j, k, l ... to the proper index. Source Edit
Templates
template advanceStridedIteration(coord, backstrides, iter_pos, t, iter_offset, iter_size: typed): untyped
- Computing the next position Source Edit
template dualStridedIteration(strider: IterKind; t1, t2, iter_offset, iter_size: typed): untyped
- Iterate over two Tensors, displaying data as in C order, whatever the strides. Source Edit
template dualStridedIterationYield(strider: IterKind; t1data, t2data, i, t1_iter_pos, t2_iter_pos: typed)
- Iterator the return value Source Edit
template initStridedIteration(coord, backstrides, iter_pos: untyped; t, iter_offset, iter_size: typed): untyped
- Iterator init Source Edit
template stridedCoordsIteration(t, iter_offset, iter_size: typed): untyped
- Iterate over a Tensor, displaying data as in C order, whatever the strides. (coords) Source Edit
template stridedIteration(strider: IterKind; t, iter_offset, iter_size: typed): untyped
- Iterate over a Tensor, displaying data as in C order, whatever the strides. Source Edit
template stridedIterationYield(strider: IterKind; data, i, iter_pos: typed)
- Iterator the return value Source Edit
template tripleStridedIteration(strider: IterKind; t1, t2, t3, iter_offset, iter_size: typed): untyped
- Iterate over two Tensors, displaying data as in C order, whatever the strides. Source Edit
template tripleStridedIterationYield(strider: IterKind; t1data, t2data, t3data, i, t1_iter_pos, t2_iter_pos, t3_iter_pos: typed)
- Iterator the return value Source Edit