Skip to main content

dlpack Namespace

Minimal DLPack-shaped structs for zero-copy interop with NumPy/PyTorch. More...

Definition

namespace simaai::neat::dlpack { ... }

Classes Index

structDLDataType

DLPack scalar dtype: code + bit width + SIMD lane count. More...

structDLDevice

DLPack device descriptor: type + numeric ID. More...

structDLManagedTensor

DLPack managed tensor: owning wrapper that calls deleter on destruction. More...

structDLTensor

DLPack non-owning tensor view: pointer + shape + strides + dtype + device. More...

Enumerations Index

enum classDLDeviceType : int { ... }

DLPack device type. Currently CPU-only; GPU/accelerator variants can be added later. More...

enumDLDataTypeCode : uint8_t { ... }

DLPack data-type category (signed int / unsigned int / floating-point). More...

Description

Minimal DLPack-shaped structs for zero-copy interop with NumPy/PyTorch.

Mirrors the standard DLPack interchange types without taking a dependency on the dlpack header itself. Used by the Python binding layer (pyneat) to expose tensors via the __dlpack__ protocol. CPU-only today; device variants can be added without breaking the ABI.

Enumerations

DLDataTypeCode

enum simaai::neat::dlpack::DLDataTypeCode : uint8_t

DLPack data-type category (signed int / unsigned int / floating-point).

Enumeration values
kDLInt (= 0)
kDLUInt (= 1)
kDLFloat (= 2)

Definition at line 42 of file TensorTypes.h.

42enum DLDataTypeCode : uint8_t {
43 kDLInt = 0,
44 kDLUInt = 1,
46};

DLDeviceType

enum class simaai::neat::dlpack::DLDeviceType : int
strong

DLPack device type. Currently CPU-only; GPU/accelerator variants can be added later.

Enumeration values
kDLCPU (= 1)

Definition at line 31 of file TensorTypes.h.

31enum class DLDeviceType : int {
32 kDLCPU = 1,
33};

The documentation for this namespace was generated from the following file:


Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.