numba_vulkan.vkdecl#

Typing of Vulkan-specific functions.

Attributes#

Classes#

GlobalId

Typing of numba_vulkan.stubs.global_id.

Barrier

Typing of numba_vulkan.stubs.barrier: no arguments, no result.

LocalArray

Typing of local.array(shape, dtype); see SharedArray.

SharedArray

Typing of shared.array(shape, dtype).

CompareAndSwap

Typing of atomic.cas(array, index, expected, value).

ExpressionGetItem

Typing of expression[index]: one element, for a full index.

ExpressionSetItem

Typing of array[index] = expression.

ExpressionAttributes

Attributes of array expressions: shape, size, ndim.

ExpressionLen

Typing of len(expression).

FancyIndexing

Reject indexing with arrays (masks, index lists) with a clear message.

RecordAttributes

Typing of record.field, to read and to assign.

RecordGetItem

Typing of record["field"].

RecordStaticGetItem

Typing of record["field"] with a constant name.

RecordSetItem

Typing of record["field"] = value.

RecordStaticSetItem

Typing of record["field"] = value with a constant name.

Functions#

is_array_like(ty)

Whether a type is an array or an array expression of this target.

element_type(ty)

Type of an element of an array or expression; a scalar's own type.

expression_type(context, op, args)

The type of applying op element-wise to args, or None.

Module Contents#

numba_vulkan.vkdecl.registry#
class numba_vulkan.vkdecl.GlobalId#

Typing of numba_vulkan.stubs.global_id.

Only a literal axis of 0, 1 or 2 is accepted, because the axis selects a component of a SPIR-V built-in at compile time.

generic(args, kws)#

Type a call.

Parameters:
  • args (tuple of numba.types.Type) – Positional argument types.

  • kws (dict) – Keyword argument types.

Returns:

int32(literal) for a valid literal axis, otherwise None, which makes Numba retry with literal argument types.

Return type:

numba.core.typing.Signature or None

class numba_vulkan.vkdecl.Barrier#

Typing of numba_vulkan.stubs.barrier: no arguments, no result.

cases#
class numba_vulkan.vkdecl.LocalArray#

Typing of local.array(shape, dtype); see SharedArray.

generic()#

Return the typer.

Return type:

callable

class numba_vulkan.vkdecl.SharedArray#

Typing of shared.array(shape, dtype).

The call carries a hidden first argument: a literal that identifies the call site, added by numba_vulkan.compiler.NumberSharedArrays. It becomes the “binding” of the array type, which tells element accesses which workgroup variable to use.

generic()#

Return the typer.

Return type:

callable

class numba_vulkan.vkdecl.CompareAndSwap#

Typing of atomic.cas(array, index, expected, value).

generic(args, kws)#

Type a call; 32-bit elements only.

numba_vulkan.vkdecl.is_array_like(ty)#

Whether a type is an array or an array expression of this target.

numba_vulkan.vkdecl.element_type(ty)#

Type of an element of an array or expression; a scalar’s own type.

numba_vulkan.vkdecl.expression_type(context, op, args)#

The type of applying op element-wise to args, or None.

Parameters:
  • context (numba.core.typing.Context) – The typing context.

  • op (callable) – An operator or ufunc.

  • args (tuple of numba.types.Type) – Argument types; at least one must be an array or expression, the others scalars.

Return type:

VulkanExpr or None

class numba_vulkan.vkdecl.ExpressionGetItem#

Typing of expression[index]: one element, for a full index.

generic(args, kws)#

Type a call; only integer indices for every axis are accepted.

class numba_vulkan.vkdecl.ExpressionSetItem#

Typing of array[index] = expression.

generic(args, kws)#

Type a call.

class numba_vulkan.vkdecl.ExpressionAttributes#

Attributes of array expressions: shape, size, ndim.

key#
resolve_shape(ty)#
resolve_size(ty)#
resolve_ndim(ty)#
class numba_vulkan.vkdecl.ExpressionLen#

Typing of len(expression).

generic(args, kws)#

Type a call.

class numba_vulkan.vkdecl.FancyIndexing#

Reject indexing with arrays (masks, index lists) with a clear message.

generic(args, kws)#

Raise for an array or expression used as an index.

class numba_vulkan.vkdecl.RecordAttributes#

Typing of record.field, to read and to assign.

key#
generic_resolve(record, attr)#

The type of a field.

Return type:

numba.types.Type or None

class numba_vulkan.vkdecl.RecordGetItem#

Typing of record["field"].

generic(args, kws)#

Type a call.

class numba_vulkan.vkdecl.RecordStaticGetItem#

Typing of record["field"] with a constant name.

key = 'static_getitem'#
generic(args, kws)#

Type a call.

class numba_vulkan.vkdecl.RecordSetItem#

Typing of record["field"] = value.

generic(args, kws)#

Type a call.

class numba_vulkan.vkdecl.RecordStaticSetItem#

Typing of record["field"] = value with a constant name.

key = 'static_setitem'#
generic(args, kws)#

Type a call.