Fork me on GitHub
Arraymancer Technical reference Tutorial Spellbook (How-To's) Under the hood

Module init_cuda

Search:
Group by:

Procs

proc cuda[T: SomeReal](t: Tensor[T]): CudaTensor[T] {.
noInit
.}
Convert a tensor on Cpu to a tensor on a Cuda device.   Source Edit
proc cpu[T: SomeReal](t: CudaTensor[T]): Tensor[T] {.
noSideEffect, noInit
.}
Convert a tensor on a Cuda device to a tensor on Cpu.   Source Edit
proc zeros_like[T: SomeReal](t: CudaTensor[T]): CudaTensor[T] {.
noInit, inline
.}
Creates a new CudaTensor filled with 0 with the same shape as the input
Input:
  • Shape of the CudaTensor
  • Type of its elements
Result:
  • A zero-ed CudaTensor of the same shape
  Source Edit
proc ones_like[T: SomeReal](t: CudaTensor[T]): CudaTensor[T] {.
noInit, inline
.}
Creates a new CudaTensor filled with 1 with the same shape as the input and filled with 1
Input:
  • A CudaTensor
Result:
  • A one-ed CudaTensor of the same shape
  Source Edit