You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

MatrixDivideConstLink.py 395 B

4 years ago
123456789101112
  1. from __future__ import absolute_import
  2. import ctypes
  3. from .._base import _LIB
  4. from .. import ndarray as _nd
  5. def matrix_elementwise_divide_const(val, in_mat, out_mat, stream=None):
  6. assert isinstance(in_mat, _nd.NDArray)
  7. assert isinstance(out_mat, _nd.NDArray)
  8. _LIB.DLGpuMatrixDivConst(
  9. ctypes.c_float(val), in_mat.handle, out_mat.handle, stream.handle if stream else None)