numba_dpex.core.boxing.usm_ndarray

Overview

Function

unbox_dpnp_nd_array(typ, obj, c)

Converts a dpctl.tensor.usm_ndarray/dpnp.ndarray object to a Numba-dpex

box_array(typ, val, c)

Boxes a NativeValue representation of USMNdArray/DpnpNdArray type into a

Functions

unbox_dpnp_nd_array(typ, obj, c)

Converts a dpctl.tensor.usm_ndarray/dpnp.ndarray object to a Numba-dpex internal array structure.

Parameters:
  • typ – The Numba type of the PyObject

  • obj – The actual PyObject to be unboxed

  • c – The unboxing context

Returns: A NativeValue object representing an unboxed

dpctl.tensor.usm_ndarray/dpnp.ndarray

box_array(typ, val, c)

Boxes a NativeValue representation of USMNdArray/DpnpNdArray type into a dpctl.tensor.usm_ndarray/dpnp.ndarray PyObject

Parameters:
  • typ – The representation of the USMNdArray/DpnpNdArray type.

  • val – A native representation of a Numba USMNdArray/DpnpNdArray type object.

  • c – The boxing context.

Returns: A Pyobject for a dpctl.tensor.usm_ndarray/dpnp.ndarray boxed from

the Numba-dpex native value.