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

Module init_opencl

Search:
Group by:

Procs

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