. _cuda_cudawrapper:

CudaWrapper

namespace cuda

Functions

ndarray::Array cudaAdd(const ndarray::Array &A, const ndarray::Array &B)

add two ndarray in cuda.

Return

another ndarray which have A+B data.

Parameters
  • A: left ndarray

  • B: right ndarray

ndarray::Array cudaMatmul(const ndarray::Array &A, const ndarray::Array &B)

matmul of two ndarray in cuda.

Return

another ndarray which have A.matmul(B) data.

Parameters
  • A: left ndarray

  • B: right ndarray

ndarray::Array cudaSlices(const ndarray::Array &A, const ndarray::Slices &slices)

slices a ndarray in cuda and return a cuda ndarray.

Return

another ndarray with slices value.

Parameters
  • A: a ndarray

  • slices: a 2D vector of slices.