Fork me on GitHub

src/arraymancer/tensor/private/p_accessors

  Source Edit

Iterators

Types

IterKind = enum
  Values, Iter_Values, Offset_Values
  Source Edit

Procs

proc atIndex[T](t: Tensor[T]; idx: varargs[int]): T {.noSideEffect, inline.}
Get the value at input coordinates This used to be [] before slicing was implemented   Source Edit
proc atIndex[T](t: var Tensor[T]; idx: varargs[int]): var T {.noSideEffect,
    inline.}
Get the value at input coordinates This allows inplace operators t1,2 += 10 syntax   Source Edit
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
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood