Fork me on GitHub

src/arraymancer/laser/dynamic_stack_arrays

Search:
Group by:
  Source Edit

Types

DynamicStackArray[T] = object
  data*: array[LASER_MAXRANK, T]
  len*: int
Custom stack allocated array that behaves like seq. We must avoid seq creation when modifying tensor shapes, strides or slicing in a tight loop. Seq creation are also not possible within an OpenMP loop.   Source Edit

Consts

LASER_MAXRANK {.intdefine.} = 6
  Source Edit

Procs

func `$`(a: DynamicStackArray): string
  Source Edit
func `&`(a, b: DynamicStackArray): DynamicStackArray
  Source Edit
func `&`[T](a: DynamicStackArray[T]; value: T): DynamicStackArray[T] {.inline.}
  Source Edit
func `==`(a, s: DynamicStackArray): bool
  Source Edit
func `==`[T](a: DynamicStackArray[T]; s: openArray[T]): bool
  Source Edit
func `@`[T](a: DynamicStackArray[T]): seq[T]
  Source Edit
func `[]`[T](a: DynamicStackArray[T]; idx: Index): T {.inline.}
  Source Edit
func `[]`[T](a: DynamicStackArray[T]; slice: Slice[int]): DynamicStackArray[T]
  Source Edit
func `[]`[T](a: var DynamicStackArray[T]; idx: Index): var T {.inline.}
  Source Edit
func `[]=`[T](a: var DynamicStackArray[T]; idx: Index; v: T) {.inline.}
  Source Edit
func add[T](a: var DynamicStackArray[T]; value: T) {.inline.}
  Source Edit
func concat[T](dsas: varargs[DynamicStackArray[T]]): DynamicStackArray[T]
  Source Edit
func copyFrom(a: var DynamicStackArray; s: DynamicStackArray) {.inline.}
  Source Edit
func copyFrom(a: var DynamicStackArray; s: varargs[int])
  Source Edit
func delete(a: var DynamicStackArray; index: int)
  Source Edit
func high(a: DynamicStackArray): int {.inline.}
  Source Edit
func insert[T](a: var DynamicStackArray[T]; value: T; index: int = 0)
  Source Edit
func low(a: DynamicStackArray): int {.inline.}
  Source Edit
func max[T](a: DynamicStackArray[T]): T
  Source Edit
func product[T: SomeNumber](a: DynamicStackArray[T]): T
  Source Edit
func reversed(a: DynamicStackArray): DynamicStackArray
  Source Edit
func reversed(a: DynamicStackArray; result: var DynamicStackArray)
  Source Edit
func setLen(a: var DynamicStackArray; len: int) {.inline.}
  Source Edit

Iterators

iterator items[T](a: DynamicStackArray[T]): T
  Source Edit
iterator mitems[T](a: var DynamicStackArray[T]): var T
  Source Edit
iterator mpairs[T](a: var DynamicStackArray[T]): (int, var T)
  Source Edit
iterator pairs[T](a: DynamicStackArray[T]): (int, T)
  Source Edit
iterator zip[T, U](a: DynamicStackArray[T]; b: DynamicStackArray[U]): (T, T)
  Source Edit
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood