nndeploy.device.buffer¶
Classes
|
- class nndeploy.device.buffer.Buffer(*args, **kwargs)[源代码]¶
基类:
Buffer- __init__(*args, **kwargs)[源代码]¶
Overloaded function.
__init__(self: nndeploy._nndeploy_internal.device.Buffer, device: nndeploy._nndeploy_internal.device.Device, size: int) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, device: nndeploy._nndeploy_internal.device.Device, desc: nndeploy._nndeploy_internal.device.BufferDesc) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, device: nndeploy._nndeploy_internal.device.Device, size: int, ptr: capsule) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, device: nndeploy._nndeploy_internal.device.Device, desc: nndeploy._nndeploy_internal.device.BufferDesc, ptr: capsule) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, device: nndeploy._nndeploy_internal.device.Device, size: int, ptr: capsule, memory_type: nndeploy._nndeploy_internal.base.MemoryType) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, device: nndeploy._nndeploy_internal.device.Device, desc: nndeploy._nndeploy_internal.device.BufferDesc, ptr: capsule, memory_type: nndeploy._nndeploy_internal.base.MemoryType) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, memory_pool: nndeploy._nndeploy_internal.device.MemoryPool, size: int) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, memory_pool: nndeploy._nndeploy_internal.device.MemoryPool, desc: nndeploy._nndeploy_internal.device.BufferDesc) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, memory_pool: nndeploy._nndeploy_internal.device.MemoryPool, size: int, ptr: capsule, memory_type: nndeploy._nndeploy_internal.base.MemoryType) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, memory_pool: nndeploy._nndeploy_internal.device.MemoryPool, desc: nndeploy._nndeploy_internal.device.BufferDesc, ptr: capsule, memory_type: nndeploy._nndeploy_internal.base.MemoryType) -> None
__init__(self: nndeploy._nndeploy_internal.device.Buffer, buffer: nndeploy._nndeploy_internal.device.Buffer) -> None
- to_numpy(*args, **kwargs)[源代码]¶
Convert the buffer to numpy array 支持两种调用方式: 1. to_numpy(dtype) - 直接传入dtype对象 2. to_numpy(dtype_obj) - 传入可转换为dtype的对象
- to_numpy_v0(self: nndeploy._nndeploy_internal.device.Buffer, dtype: numpy.dtype) numpy.ndarray¶
Convert buffer to numpy array with specified dtype
- to_numpy_v1(self: nndeploy._nndeploy_internal.device.Buffer, dtype: object) numpy.ndarray¶
Convert buffer to numpy array with dtype object