nndeploy.device.type

Classes

BufferDesc(*args, **kwargs)

TensorDesc(*args, **kwargs)

class nndeploy.device.type.BufferDesc(*args, **kwargs)[源代码]

基类:BufferDesc

__init__(*args, **kwargs)[源代码]

Constructs a BufferDesc object.

The constructor can be called in the following ways: 1. BufferDesc(): Constructs an empty BufferDesc. 2. BufferDesc(size): Constructs a BufferDesc with size. 3. BufferDesc(size_ptr, size): Constructs a BufferDesc from a size_t array of size. 4. BufferDesc(size_vector): Constructs a BufferDesc from a base::SizeVector. 5. BufferDesc(size, int_vector): Constructs a BufferDesc from a size and a base::IntVector. 6. BufferDesc(size_vector, int_vector): Constructs a BufferDesc from a base::SizeVector and a base::IntVector. 7. BufferDesc(size_ptr, size, int_vector): Constructs a BufferDesc from a size_t array of size and a base::IntVector.

get_size(self: nndeploy._nndeploy_internal.device.BufferDesc) int[源代码]
get_size_vector(self: nndeploy._nndeploy_internal.device.BufferDesc) list[int][源代码]
get_real_size(self: nndeploy._nndeploy_internal.device.BufferDesc) int[源代码]
get_real_size_vector(self: nndeploy._nndeploy_internal.device.BufferDesc) list[int][源代码]
get_config(self: nndeploy._nndeploy_internal.device.BufferDesc) list[int][源代码]
is_same_config(self: nndeploy._nndeploy_internal.device.BufferDesc, arg0: nndeploy._nndeploy_internal.device.BufferDesc) bool[源代码]
is_same_dim(self: nndeploy._nndeploy_internal.device.BufferDesc, arg0: nndeploy._nndeploy_internal.device.BufferDesc) bool[源代码]
is_1d(self: nndeploy._nndeploy_internal.device.BufferDesc) bool[源代码]
print(self: nndeploy._nndeploy_internal.device.BufferDesc, arg0: std::ostream) None[源代码]
just_modify(*args, **kwargs)[源代码]

Overloaded function.

  1. just_modify(self: nndeploy._nndeploy_internal.device.BufferDesc, arg0: int) -> bool

  2. just_modify(self: nndeploy._nndeploy_internal.device.BufferDesc, arg0: list[int]) -> bool

  3. just_modify(self: nndeploy._nndeploy_internal.device.BufferDesc, arg0: nndeploy._nndeploy_internal.device.BufferDesc) -> bool

clear(self: nndeploy._nndeploy_internal.device.BufferDesc) None[源代码]
class nndeploy.device.type.TensorDesc(*args, **kwargs)[源代码]

基类:TensorDesc

__init__(*args, **kwargs)[源代码]

Constructs a TensorDesc object.

The constructor can be called in the following ways: 1. TensorDesc(): Constructs an empty TensorDesc object. 2. TensorDesc(data_type, format, shape): Constructs a TensorDesc object from data type, data format and shape. 3. TensorDesc(data_type, format, shape, stride): Constructs a TensorDesc object from data type, data format, shape and stride. 4. TensorDesc(desc): Constructs a new TensorDesc object from another TensorDesc object.

print(self: nndeploy._nndeploy_internal.device.TensorDesc, stream: std::ostream) None[源代码]
property data_type
property data_format
property data_format_
property data_type_
deserialize(self: nndeploy._nndeploy_internal.device.TensorDesc, arg0: str) nndeploy._nndeploy_internal.base.Status
serialize(self: nndeploy._nndeploy_internal.device.TensorDesc, arg0: str) nndeploy._nndeploy_internal.base.Status
property shape
property shape_
property stride_
property stride