numba_dpex.core.typing.typeof

Overview

Function

typeof_usm_ndarray(val, c)

Registers the type inference implementation function for

typeof_dpnp_ndarray(val, c)

Registers the type inference implementation function for dpnp.ndarray.

typeof_dpctl_sycl_queue(val, c)

Registers the type inference implementation function for a

typeof_dpctl_sycl_event(val, c)

Registers the type inference implementation function for a

typeof_range(val, c)

Registers the type inference implementation function for a

typeof_ndrange(val, c)

Registers the type inference implementation function for a

typeof_atomic_ref(val, ctx)

Returns a numba_dpex.experimental.dpctpp_types.AtomicRefType

typeof_group(val, c)

Registers the type inference implementation function for a

typeof_item(val, c)

Registers the type inference implementation function for a

typeof_nditem(val, c)

Registers the type inference implementation function for a

typeof_local_accessor(val, c)

Returns a numba_dpex.experimental.dpctpp_types.LocalAccessorType

Functions

typeof_usm_ndarray(val, c)

Registers the type inference implementation function for dpctl.tensor.usm_ndarray

Parameters:
  • val – A Python object that should be an instance of a

  • dpctl.tensor.usm_ndarray

  • c – Unused argument used to be consistent with Numba API.

Raises:
  • ValueError – If an unsupported dtype encountered or val has

  • no usm_type or sycl_device attribute.

Returns: The Numba type corresponding to dpctl.tensor.usm_ndarray

typeof_dpnp_ndarray(val, c)

Registers the type inference implementation function for dpnp.ndarray.

Parameters:
  • val – A Python object that should be an instance of a

  • dpnp.ndarray

  • c – Unused argument used to be consistent with Numba API.

Raises:
  • ValueError – If an unsupported dtype encountered or val has

  • no usm_type or sycl_device attribute.

Returns: The Numba type corresponding to dpnp.ndarray

typeof_dpctl_sycl_queue(val, c)

Registers the type inference implementation function for a dpctl.SyclQueue PyObject.

Parameters:
  • val – An instance of dpctl.SyclQueue.

  • c – Unused argument used to be consistent with Numba API.

Returns: A numba_dpex.core.types.dpctl_types.DpctlSyclQueue instance.

typeof_dpctl_sycl_event(val, c)

Registers the type inference implementation function for a dpctl.SyclEvent PyObject.

Parameters:
  • val – An instance of dpctl.SyclEvent.

  • c – Unused argument used to be consistent with Numba API.

Returns: A numba_dpex.core.types.dpctl_types.DpctlSyclEvent instance.

typeof_range(val, c)

Registers the type inference implementation function for a numba_dpex.Range PyObject.

Parameters:
  • val – An instance of numba_dpex.Range.

  • c – Unused argument used to be consistent with Numba API.

Returns: A numba_dpex.core.types.range_types.RangeType instance.

typeof_ndrange(val, c)

Registers the type inference implementation function for a numba_dpex.NdRange PyObject.

Parameters:
  • val – An instance of numba_dpex.Range.

  • c – Unused argument used to be consistent with Numba API.

Returns: A numba_dpex.core.types.range_types.RangeType instance.

typeof_atomic_ref(val: AtomicRef, ctx) AtomicRefType

Returns a numba_dpex.experimental.dpctpp_types.AtomicRefType instance for a Python AtomicRef object.

Parameters:
  • val (AtomicRef) – Instance of the AtomicRef type.

  • ctx – Numba typing context used for type inference.

Returns: AtomicRefType object corresponding to the AtomicRef object.

typeof_group(val: Group, c)

Registers the type inference implementation function for a numba_dpex.kernel_api.Group PyObject.

Parameters:
  • val – An instance of numba_dpex.kernel_api.Group.

  • c – Unused argument used to be consistent with Numba API.

Returns: A numba_dpex.experimental.core.types.kernel_api.items.GroupType

instance.

typeof_item(val: Item, c)

Registers the type inference implementation function for a numba_dpex.kernel_api.Item PyObject.

Parameters:
  • val – An instance of numba_dpex.kernel_api.Item.

  • c – Unused argument used to be consistent with Numba API.

Returns: A numba_dpex.experimental.core.types.kernel_api.items.ItemType

instance.

typeof_nditem(val: NdItem, c)

Registers the type inference implementation function for a numba_dpex.kernel_api.NdItem PyObject.

Parameters:
  • val – An instance of numba_dpex.kernel_api.NdItem.

  • c – Unused argument used to be consistent with Numba API.

Returns: A numba_dpex.experimental.core.types.kernel_api.items.NdItemType

instance.

typeof_local_accessor(val: LocalAccessor, c) LocalAccessorType

Returns a numba_dpex.experimental.dpctpp_types.LocalAccessorType instance for a Python LocalAccessor object. :param val: Instance of the LocalAccessor type. :type val: LocalAccessor :param c: Numba typing context used for type inference.

Returns: LocalAccessorType object corresponding to the LocalAccessor object.