numba_vulkan.models#

Data models: how Vulkan-target types are represented in LLVM IR.

Attributes#

Classes#

VulkanArrayModel

Array metadata only; the data is reached through the type's binding.

VulkanRecordModel

Where a record lies: its buffer's binding and its first byte.

VulkanArrayIteratorModel

Position along the first axis, and the array iterated over.

VulkanExprModel

The operands of an array expression, one member each.

Module Contents#

numba_vulkan.models.vulkan_data_manager#
numba_vulkan.models.register_model#
class numba_vulkan.models.VulkanArrayModel(dmm, fe_type)#

Array metadata only; the data is reached through the type’s binding.

offset is the position of the array’s first element in the buffer, counted in elements; strides are in bytes, as in NumPy. Together they let slices be views of the same buffer.

Member names match Numba’s own array model so that its shape, size, len()… implementations work unchanged. There is deliberately no data member: Numba code that needs the data pointer fails at compile time instead of producing an invalid shader.

Parameters:
  • dmm (numba.core.datamodel.DataModelManager) – The data model manager.

  • fe_type (VulkanArray) – The array type being modelled.

class numba_vulkan.models.VulkanRecordModel(dmm, fe_type)#

Where a record lies: its buffer’s binding and its first byte.

Parameters:
  • dmm (numba.core.datamodel.DataModelManager) – The data model manager.

  • fe_type (VulkanRecord) – The record type being modelled.

class numba_vulkan.models.VulkanArrayIteratorModel(dmm, fe_type)#

Position along the first axis, and the array iterated over.

Parameters:
  • dmm (numba.core.datamodel.DataModelManager) – The data model manager.

  • fe_type (VulkanArrayIterator) – The iterator type being modelled.

class numba_vulkan.models.VulkanExprModel(dmm, fe_type)#

The operands of an array expression, one member each.

Parameters:
  • dmm (numba.core.datamodel.DataModelManager) – The data model manager.

  • fe_type (VulkanExpr) – The expression type being modelled.