holoscan.resources
此模块为底层 C++ API 资源提供 Python API。
- class holoscan.resources.Allocator
基类:
holoscan.gxf._gxf.GXFResource
基础分配器类。
属性
args
与组件关联的参数列表。 block_size
获取分配器的块大小。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 allocate
(self, size, type)分配请求的内存量。 free
(self, pointer)释放已分配的内存 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 is_available
(self, size)表示资源是否可用的布尔值。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.Allocator) → None
基础分配器类。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
分配请求的内存量。
- 参数
- sizeint
要分配的内存量
- typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- 不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property block_size
获取分配器的块大小。
- 返回值
- int
分配器的块大小。字节型分配器返回 1。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
释放已分配的内存
- 参数
- pointerPyCapsule
不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
表示资源是否可用的布尔值。
- 返回值
- bool
资源的可用性。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.BlockMemoryPool
基类:
holoscan.resources._resources.Allocator
块内存池资源。
提供最大数量的等大小内存块。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- storage_typeint 或 holoscan.resources.MemoryStorageType
存储类型 (0=主机, 1=设备, 2=系统)。
- block_sizeint
内存池中每个块的大小(以字节为单位)。
- num_blocksint
内存池中的块数。
- dev_idint
CUDA 设备 ID。指定在其上创建内存池的设备。
- namestr, 可选
内存池的名称。
属性
args
与组件关联的参数列表。 block_size
获取分配器的块大小。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 allocate
(self, size, type)分配请求的内存量。 free
(self, pointer)释放已分配的内存 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 is_available
(self, size)表示资源是否可用的布尔值。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.BlockMemoryPool, fragment: holoscan.core._core.Fragment, storage_type: int, block_size: int, num_blocks: int, dev_id: int = 0, name: str = 'block_memory_pool') → None
块内存池资源。
提供最大数量的等大小内存块。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- storage_typeint 或 holoscan.resources.MemoryStorageType
存储类型 (0=主机, 1=设备, 2=系统)。
- block_sizeint
内存池中每个块的大小(以字节为单位)。
- num_blocksint
内存池中的块数。
- dev_idint
CUDA 设备 ID。指定在其上创建内存池的设备。
- namestr, 可选
内存池的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
分配请求的内存量。
- 参数
- sizeint
要分配的内存量
- typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- 不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property block_size
获取分配器的块大小。
- 返回值
- int
分配器的块大小。字节型分配器返回 1。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
释放已分配的内存
- 参数
- pointerPyCapsule
不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
表示资源是否可用的布尔值。
- 返回值
- bool
资源的可用性。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.Clock
基类:
holoscan.gxf._gxf.GXFResource
基础时钟类。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(*args, **kwargs)
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.CudaAllocator
基类:
holoscan.resources._resources.Allocator
基于 CUDA 的分配器的基类。
属性
args
与组件关联的参数列表。 block_size
获取分配器的块大小。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 pool_size
返回指定存储类型的内存池大小。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 allocate
(self, size, type)分配请求的内存量。 free
(self, pointer)释放已分配的内存 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 is_available
(self, size)表示资源是否可用的布尔值。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.CudaAllocator) → None
基于 CUDA 的分配器的基类。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
分配请求的内存量。
- 参数
- sizeint
要分配的内存量
- typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- 不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property block_size
获取分配器的块大小。
- 返回值
- int
分配器的块大小。字节型分配器返回 1。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
释放已分配的内存
- 参数
- pointerPyCapsule
不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
表示资源是否可用的布尔值。
- 返回值
- bool
资源的可用性。
- property name
资源的名称。
- 返回值
- namestr
- property pool_size
返回指定存储类型的内存池大小。
- 参数
- storage_typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- sizeint
指定存储类型的内存池大小。
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.CudaStreamPool
基类:
holoscan.resources._resources.Allocator
CUDA 流池。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- dev_idint
CUDA 设备 ID。指定在其上创建流池的设备。
- stream_flagsint
流池中 CUDA 流的标志。这将在创建流时传递给 CUDA 的 cudaStreamCreateWithPriority [R47f67d935b70-1]。默认值 0 对应于
cudaStreamDefault
。值 1 对应于cudaStreamNonBlocking
,表示流可以与流 0(默认流)中的工作并发运行,并且不应执行任何与其的隐式同步。- stream_priorityint
流池中 CUDA 流的优先级值。这是一个传递给 cudaSreamCreateWithPriority [R47f67d935b70-1] 的整数值。数字越小表示优先级越高。
- reserved_sizeint
最初在池中保留的 CUDA 流的数量(在首次请求之前)。
- max_sizeint
可以分配的最大流数,默认情况下无限制。
- namestr, 可选
流池的名称。
参考
属性
args
与组件关联的参数列表。 block_size
获取分配器的块大小。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 allocate
(self, size, type)分配请求的内存量。 free
(self, pointer)释放已分配的内存 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 is_available
(self, size)表示资源是否可用的布尔值。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.CudaStreamPool, fragment: holoscan.core._core.Fragment, dev_id: int = 0, stream_flags: int = 0, stream_priority: int = 0, reserved_size: int = 1, max_size: int = 0, name: str = 'cuda_stream_pool') → None
CUDA 流池。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- dev_idint
CUDA 设备 ID。指定在其上创建流池的设备。
- stream_flagsint
流池中 CUDA 流的标志。这将在创建流时传递给 CUDA 的 cudaStreamCreateWithPriority [Rb9bddbe55e1a-1]。默认值 0 对应于
cudaStreamDefault
。值 1 对应于cudaStreamNonBlocking
,表示流可以与流 0(默认流)中的工作并发运行,并且不应执行任何与其的隐式同步。- stream_priorityint
流池中 CUDA 流的优先级值。这是一个传递给 cudaSreamCreateWithPriority [Rb9bddbe55e1a-1] 的整数值。数字越小表示优先级越高。
- reserved_sizeint
最初在池中保留的 CUDA 流的数量(在首次请求之前)。
- max_sizeint
可以分配的最大流数,默认情况下无限制。
- namestr, 可选
流池的名称。
参考
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
分配请求的内存量。
- 参数
- sizeint
要分配的内存量
- typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- 不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property block_size
获取分配器的块大小。
- 返回值
- int
分配器的块大小。字节型分配器返回 1。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
释放已分配的内存
- 参数
- pointerPyCapsule
不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
表示资源是否可用的布尔值。
- 返回值
- bool
资源的可用性。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.DoubleBufferReceiver
基类:
holoscan.resources._resources.Receiver
使用双缓冲队列的接收器。
新消息首先推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- capacityint, 可选
接收器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- namestr, 可选
接收器的名称。
属性
args
与组件关联的参数列表。 back_size
接收器队列后台的大小。 capacity
接收器队列主级容量。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 size
接收器队列主级大小。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.DoubleBufferReceiver, fragment: holoscan.core._core.Fragment, capacity: int = 1, policy: int = 2, name: str = 'double_buffer_receiver') → None
使用双缓冲队列的接收器。
新消息首先推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- capacityint, 可选
接收器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- namestr, 可选
接收器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property back_size
接收器队列后台的大小。
- property capacity
接收器队列主级的容量。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property size
接收器队列主级的大小。
- property spec
- class holoscan.resources.DoubleBufferTransmitter
基类:
holoscan.resources._resources.Transmitter
使用双缓冲队列的发送器。
消息在发布后被推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- capacityint, 可选
发送器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- namestr, 可选
发送器的名称。
属性
args
与组件关联的参数列表。 back_size
发送器队列后台的大小。 capacity
发送器队列主级容量。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 size
发送器队列主级大小。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.DoubleBufferTransmitter, fragment: holoscan.core._core.Fragment, capacity: int = 1, policy: int = 2, name: str = 'double_buffer_transmitter') → None
使用双缓冲队列的发送器。
消息在发布后被推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- capacityint, 可选
发送器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- namestr, 可选
发送器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property back_size
发送器队列后台的大小。
- property capacity
发送器队列主级的容量。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property size
发送器队列主级的大小。
- property spec
- class holoscan.resources.GXFComponentResource(fragment, *args, **kwargs)
基类:
holoscan.resources._resources.GXFComponentResource
将 GXF 组件包装为 Holoscan 资源的类。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
资源所属的 Fragment。
- gxf_typenamestr
标识要包装的特定 GXF 组件的 GXF 类型名称。
- namestr, 可选 (仅限构造函数)
资源的名称。默认值为 “gxf_component”。
- kwargsdict
可以传递的附加关键字参数取决于底层 GXF 组件。这些参数可以为资源提供进一步的自定义和功能。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(*args, **kwargs)
重载函数。
__init__(self: holoscan.resources._resources.GXFComponentResource) -> None
__init__(self: holoscan.resources._resources.GXFComponentResource, component: object, fragment: holoscan.core._core.Fragment, gxf_typename: str, *, name: str = ‘gxf_component’, **kwargs) -> None
将 GXF 组件包装为 Holoscan 资源的类。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
资源所属的 Fragment。
- gxf_typenamestr
标识要包装的特定 GXF 组件的 GXF 类型名称。
- namestr, 可选 (仅限构造函数)
资源的名称。默认值为 “gxf_component”。
- kwargsdict
可以传递的附加关键字参数取决于底层 GXF 组件。这些参数可以为资源提供进一步的自定义和功能。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.ManualClock
基类:
holoscan.resources._resources.Clock
手动时钟。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- initial_timestampint, 可选
时钟上的初始时间戳(以纳秒为单位)。
- namestr, 可选
时钟的名称。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 sleep_for
(self, arg0)设置 GXF 调度器休眠指定时长。 sleep_until
(self, target_time_ns)设置 GXF 调度器休眠到指定时间戳。 time
(self)时钟的当前时间(以秒为单位)。 timestamp
(self)时钟的当前时间戳(以纳秒为单位)。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.ManualClock, fragment: holoscan.core._core.Fragment, initial_timestamp: int = 0, name: str = 'realtime_clock') → None
手动时钟。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- initial_timestampint, 可选
时钟上的初始时间戳(以纳秒为单位)。
- namestr, 可选
时钟的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- sleep_for(self: holoscan.resources._resources.ManualClock, arg0: object) → None
设置 GXF 调度器休眠指定时长。
- 参数
- duration_nsint
要休眠的持续时间(以纳秒为单位)。
- sleep_until(self: holoscan.resources._resources.ManualClock, target_time_ns: int) → None
设置 GXF 调度器休眠到指定时间戳。
- 参数
- target_time_nsint
目标时间戳(以纳秒为单位)。
- property spec
- time(self: holoscan.resources._resources.ManualClock) → float
时钟的当前时间(以秒为单位)。
- 参数
- timedouble
时钟的当前时间(以秒为单位)。
- timestamp(self: holoscan.resources._resources.ManualClock) → int
时钟的当前时间戳(以纳秒为单位)。
- 参数
- timestampint
时钟的当前时间戳(以纳秒为单位)。
- class holoscan.resources.MemoryStorageType
基类:
pybind11_builtins.pybind11_object
成员
HOST
DEVICE
SYSTEM
属性
value - DEVICE = <MemoryStorageType.DEVICE: 1>
- HOST = <MemoryStorageType.HOST: 0>
- SYSTEM = <MemoryStorageType.SYSTEM: 2>
- __init__(self: holoscan.resources._resources.MemoryStorageType, value: int) → None
- property name
- property value
- class holoscan.resources.RMMAllocator
基类:
holoscan.resources._resources.CudaAllocator
使用 RAPIDS 内存管理器 (RMM) 的设备和主机分配器。
为异步分配的 CUDA 设备内存和固定主机内存提供内存池。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- device_memory_initial_sizestr, 可选
设备内存池的初始大小。有关接受的格式,请参阅“注释”部分。
- device_memory_max_sizestr, 可选
设备内存池的最大大小。有关接受的格式,请参阅“注释”部分。
- host_memory_initial_sizestr, 可选
主机内存池的初始大小。有关接受的格式,请参阅“注释”部分。
- host_memory_max_sizestr, 可选
主机内存池的最大大小。有关接受的格式,请参阅“注释”部分。
- dev_idint
GPU 设备 ID。指定在其上创建内存池的设备。
- namestr, 可选
内存池的名称。
注释
内存参数的值(例如 device_memory_initial_size)必须以字符串形式指定,其中包含非负整数值,后跟表示单位的后缀。支持的单位为 B、KB、MB、GB 和 TB,其中值是 1024 字节的幂(例如 MB = 1024 * 1024 字节)。有效单位的示例为 “512MB”、“256 KB”、“1 GB”。如果指定了浮点数,则小数部分将被截断(即,该值向下舍入到最接近的整数)。
属性
args
与组件关联的参数列表。 block_size
获取分配器的块大小。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 pool_size
返回指定存储类型的内存池大小。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 allocate
(self, size, type)分配请求的内存量。 free
(self, pointer)释放已分配的内存 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 is_available
(self, size)表示资源是否可用的布尔值。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.RMMAllocator, fragment: holoscan.core._core.Fragment, device_memory_initial_size: str = '16MB', device_memory_max_size: str = '32MB', host_memory_initial_size: str = '16MB', host_memory_max_size: str = '32MB', dev_id: int = 0, name: str = 'rmm_pool') → None
使用 RAPIDS 内存管理器 (RMM) 的设备和主机分配器。
为异步分配的 CUDA 设备内存和固定主机内存提供内存池。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- device_memory_initial_sizestr, 可选
设备内存池的初始大小。有关接受的格式,请参阅“注释”部分。
- device_memory_max_sizestr, 可选
设备内存池的最大大小。有关接受的格式,请参阅“注释”部分。
- host_memory_initial_sizestr, 可选
主机内存池的初始大小。有关接受的格式,请参阅“注释”部分。
- host_memory_max_sizestr, 可选
主机内存池的最大大小。有关接受的格式,请参阅“注释”部分。
- dev_idint
GPU 设备 ID。指定在其上创建内存池的设备。
- namestr, 可选
内存池的名称。
注释
内存参数的值(例如 device_memory_initial_size)必须以字符串形式指定,其中包含非负整数值,后跟表示单位的后缀。支持的单位为 B、KB、MB、GB 和 TB,其中值是 1024 字节的幂(例如 MB = 1024 * 1024 字节)。有效单位的示例为 “512MB”、“256 KB”、“1 GB”。如果指定了浮点数,则小数部分将被截断(即,该值向下舍入到最接近的整数)。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
分配请求的内存量。
- 参数
- sizeint
要分配的内存量
- typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- 不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property block_size
获取分配器的块大小。
- 返回值
- int
分配器的块大小。字节型分配器返回 1。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
释放已分配的内存
- 参数
- pointerPyCapsule
不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
表示资源是否可用的布尔值。
- 返回值
- bool
资源的可用性。
- property name
资源的名称。
- 返回值
- namestr
- property pool_size
返回指定存储类型的内存池大小。
- 参数
- storage_typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- sizeint
指定存储类型的内存池大小。
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.RealtimeClock
基类:
holoscan.resources._resources.Clock
实时时钟。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- initial_timestampfloat, 可选
在手动更改时间刻度之前使用的初始时间偏移量。
- initial_time_scalefloat, 可选
在手动更改时间刻度之前使用的初始时间刻度。
- use_time_since_epochbool, 可选
如果为 True,则时钟时间为自 epoch 以来的时间 + initialize() 时的 initial_time_offset。否则,时钟时间为 initialize() 时的 initial_time_offset。
- namestr, 可选
时钟的名称。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 set_time_scale
(self, time_scale)调整时钟使用的时间缩放。 setup
(self, arg0)资源的 setup 方法。 sleep_for
(self, arg0)设置 GXF 调度器休眠指定时长。 sleep_until
(self, target_time_ns)设置 GXF 调度器休眠到指定时间戳。 time
(self)时钟的当前时间(以秒为单位)。 timestamp
(self)时钟的当前时间戳(以纳秒为单位)。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.RealtimeClock, fragment: holoscan.core._core.Fragment, initial_time_offset: float = 0.0, initial_time_scale: float = 1.0, use_time_since_epoch: bool = False, name: str = 'realtime_clock') → None
实时时钟。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- initial_timestampfloat, 可选
在手动更改时间刻度之前使用的初始时间偏移量。
- initial_time_scalefloat, 可选
在手动更改时间刻度之前使用的初始时间刻度。
- use_time_since_epochbool, 可选
如果为 True,则时钟时间为自 epoch 以来的时间 + initialize() 时的 initial_time_offset。否则,时钟时间为 initialize() 时的 initial_time_offset。
- namestr, 可选
时钟的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- set_time_scale(self: holoscan.resources._resources.RealtimeClock, time_scale: float) → None
调整时钟使用的时间缩放。
- 参数
- time_scalefloat,可选
持续时间(例如,对于周期性条件或 sleep_for)将按此比例值缩小。比例 1.0 表示实时,而比例 2.0 表示时间流逝速度快两倍的时钟。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- sleep_for(self: holoscan.resources._resources.RealtimeClock, arg0: object) → None
设置 GXF 调度器休眠指定时长。
- 参数
- duration_nsint
要休眠的持续时间(以纳秒为单位)。
- sleep_until(self: holoscan.resources._resources.RealtimeClock, target_time_ns: int) → None
设置 GXF 调度器休眠到指定时间戳。
- 参数
- target_time_nsint
目标时间戳(以纳秒为单位)。
- property spec
- time(self: holoscan.resources._resources.RealtimeClock) → float
时钟的当前时间(以秒为单位)。
- 参数
- timedouble
时钟的当前时间(以秒为单位)。
- timestamp(self: holoscan.resources._resources.RealtimeClock) → int
时钟的当前时间戳(以纳秒为单位)。
- 参数
- timestampint
时钟的当前时间戳(以纳秒为单位)。
- class holoscan.resources.Receiver
基类:
holoscan.gxf._gxf.GXFResource
基础 GXF 接收器类。
属性
args
与组件关联的参数列表。 back_size
接收器队列后台的大小。 capacity
接收器队列主级容量。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 size
接收器队列主级大小。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.Receiver) → None
基础 GXF 接收器类。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property back_size
接收器队列后台的大小。
- property capacity
接收器队列主级的容量。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property size
接收器队列主级的大小。
- property spec
- class holoscan.resources.SerializationBuffer
基类:
holoscan.gxf._gxf.GXFResource
序列化缓冲区。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- allocatorholoscan.resource.Allocator
张量组件的内存分配器。
- buffer_sizeint,可选
缓冲区的大小(以字节为单位)。
- namestr, 可选
序列化缓冲区的名称
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.SerializationBuffer, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator = None, buffer_size: int = 4096, name: str = 'serialization_buffer') → None
序列化缓冲区。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- allocatorholoscan.resource.Allocator
张量组件的内存分配器。
- buffer_sizeint,可选
缓冲区的大小(以字节为单位)。
- namestr, 可选
序列化缓冲区的名称
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.StdComponentSerializer
基类:
holoscan.gxf._gxf.GXFResource
用于 GXF 时间戳和张量组件的序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- namestr, 可选
序列化器的名称。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)初始化资源 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.StdComponentSerializer, fragment: holoscan.core._core.Fragment, name: str = 'standard_component_serializer') → None
用于 GXF 时间戳和张量组件的序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- namestr, 可选
序列化器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.resources._resources.StdComponentSerializer) → None
初始化资源
此方法仅在首次创建资源时调用一次,并使用轻量级初始化。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.StdEntitySerializer
基类:
holoscan.gxf._gxf.GXFResource
GXF 实体的默认序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- namestr, 可选
序列化器的名称。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.StdEntitySerializer, fragment: holoscan.core._core.Fragment, name: str = 'std_entity_serializer') → None
GXF 实体的默认序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- namestr, 可选
序列化器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.StreamOrderedAllocator
基类:
holoscan.resources._resources.CudaAllocator
使用 RAPIDS 内存管理器 (StreamOrdered) 的设备和主机分配器。
为异步分配的 CUDA 设备内存和固定主机内存提供内存池。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- device_memory_initial_sizestr, 可选
设备内存池的初始大小。有关接受的格式,请参阅“注释”部分。
- device_memory_max_sizestr, 可选
设备内存池的最大大小。有关接受的格式,请参阅“注释”部分。
- release_thresholdstr,可选
在尝试将内存释放回操作系统之前,要保留的已保留内存量。有关接受的格式,请参阅“注释”部分。
- dev_idint,可选
GPU 设备 ID。指定在其上创建内存池的设备。
- namestr, 可选
内存池的名称。
注释
内存参数的值(例如 device_memory_initial_size)必须以字符串形式指定,其中包含非负整数值,后跟表示单位的后缀。支持的单位为 B、KB、MB、GB 和 TB,其中值是 1024 字节的幂(例如 MB = 1024 * 1024 字节)。有效单位的示例为 “512MB”、“256 KB”、“1 GB”。如果指定了浮点数,则小数部分将被截断(即,该值向下舍入到最接近的整数)。
属性
args
与组件关联的参数列表。 block_size
获取分配器的块大小。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 pool_size
返回指定存储类型的内存池大小。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 allocate
(self, size, type)分配请求的内存量。 free
(self, pointer)释放已分配的内存 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 is_available
(self, size)表示资源是否可用的布尔值。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.StreamOrderedAllocator, fragment: holoscan.core._core.Fragment, device_memory_initial_size: str = '16MB', device_memory_max_size: str = '32MB', release_threshold: str = '4MB', dev_id: int = 0, name: str = 'stream_ordered_allocator') → None
使用 RAPIDS 内存管理器 (StreamOrdered) 的设备和主机分配器。
为异步分配的 CUDA 设备内存和固定主机内存提供内存池。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- device_memory_initial_sizestr, 可选
设备内存池的初始大小。有关接受的格式,请参阅“注释”部分。
- device_memory_max_sizestr, 可选
设备内存池的最大大小。有关接受的格式,请参阅“注释”部分。
- release_thresholdstr,可选
在尝试将内存释放回操作系统之前,要保留的已保留内存量。有关接受的格式,请参阅“注释”部分。
- dev_idint,可选
GPU 设备 ID。指定在其上创建内存池的设备。
- namestr, 可选
内存池的名称。
注释
内存参数的值(例如 device_memory_initial_size)必须以字符串形式指定,其中包含非负整数值,后跟表示单位的后缀。支持的单位为 B、KB、MB、GB 和 TB,其中值是 1024 字节的幂(例如 MB = 1024 * 1024 字节)。有效单位的示例为 “512MB”、“256 KB”、“1 GB”。如果指定了浮点数,则小数部分将被截断(即,该值向下舍入到最接近的整数)。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
分配请求的内存量。
- 参数
- sizeint
要分配的内存量
- typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- 不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property block_size
获取分配器的块大小。
- 返回值
- int
分配器的块大小。字节型分配器返回 1。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
释放已分配的内存
- 参数
- pointerPyCapsule
不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
表示资源是否可用的布尔值。
- 返回值
- bool
资源的可用性。
- property name
资源的名称。
- 返回值
- namestr
- property pool_size
返回指定存储类型的内存池大小。
- 参数
- storage_typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- sizeint
指定存储类型的内存池大小。
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.ThreadPool
基类:
holoscan.gxf._gxf.GXFSystemResourceBase
,holoscan.gxf._gxf.GXFResource
由 EventBasedScheduler 或 MultiThreadScheduler 调度的运算符的线程池。
- 参数
- initialize_sizeint,可选
池中工作线程的初始数量。
- namestr, 可选
线程池的名称。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 operators
与此线程池关联的运算符。 resource_type
资源类型。 spec 方法
add
(*args, **kwargs)重载函数。 add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.ThreadPool, fragment: holoscan.core._core.Fragment, initial_size: int = 1, name: str = 'thread_pool') → None
由 EventBasedScheduler 或 MultiThreadScheduler 调度的运算符的线程池。
- 参数
- initialize_sizeint,可选
池中工作线程的初始数量。
- namestr, 可选
线程池的名称。
- add(*args, **kwargs)
重载函数。
add(self: holoscan.resources._resources.ThreadPool, op: holoscan.core._core.Operator, pin_operator: bool = False) -> None
add(self: holoscan.resources._resources.ThreadPool, ops: list[holoscan.core._core.Operator], pin_operator: bool = False) -> None
分配一个或多个运算符以使用线程池。
- 参数
- opsOperator 或 list[Operator]
要添加到线程池的运算符。
- pin_operatorbool,可选
如果为 True,则运算符将固定到池中的特定线程。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property operators
与此线程池关联的运算符。
- 返回值
- list[Operator]
已添加到此线程池的运算符列表。
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.Transmitter
基类:
holoscan.gxf._gxf.GXFResource
基础 GXF 发送器类。
属性
args
与组件关联的参数列表。 back_size
发送器队列后台的大小。 capacity
发送器队列主级容量。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 size
发送器队列主级大小。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.Transmitter) → None
基础 GXF 发送器类。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property back_size
发送器队列后台的大小。
- property capacity
发送器队列主级的容量。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property size
发送器队列主级的大小。
- property spec
- class holoscan.resources.UcxComponentSerializer
基类:
holoscan.gxf._gxf.GXFResource
UCX 组件序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- allocatorholoscan.resource.Allocator
张量组件的内存分配器。
- namestr, 可选
组件序列化器的名称。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.UcxComponentSerializer, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator = None, name: str = 'ucx_component_serializer') → None
UCX 组件序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- allocatorholoscan.resource.Allocator
张量组件的内存分配器。
- namestr, 可选
组件序列化器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.UcxEntitySerializer
基类:
holoscan.gxf._gxf.GXFResource
UCX 实体序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- component_serializerholoscan.resource.Resource 列表
实体序列化器使用的组件序列化器。
- verbose_warningbool,可选
是否在序列化期间使用详细警告。
- namestr, 可选
实体序列化器的名称。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.UcxEntitySerializer, fragment: holoscan.core._core.Fragment, verbose_warning: bool = False, name: str = 'ucx_entity_serializer') → None
UCX 实体序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- component_serializerholoscan.resource.Resource 列表
实体序列化器使用的组件序列化器。
- verbose_warningbool,可选
是否在序列化期间使用详细警告。
- namestr, 可选
实体序列化器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.UcxHoloscanComponentSerializer
基类:
holoscan.gxf._gxf.GXFResource
UCX Holoscan 组件序列化器。
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.UcxHoloscanComponentSerializer, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator = None, name: str = 'ucx_component_serializer') → None
UCX Holoscan 组件序列化器。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- allocatorholoscan.resource.Allocator
张量组件的内存分配器。
- namestr, 可选
组件序列化器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.UcxReceiver
基类:
holoscan.resources._resources.Receiver
使用双缓冲队列的 UCX 网络接收器。
新消息首先推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- bufferholoscan.resource.UcxSerializationBuffer
发射器使用的序列化缓冲区。
- capacityint, 可选
接收器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- addressstr,可选
发射器使用的 IP 地址。
- portint,可选
发射器使用的网络端口。
- namestr, 可选
接收器的名称。
属性
args
与组件关联的参数列表。 back_size
接收器队列后台的大小。 capacity
接收器队列主级容量。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 size
接收器队列主级大小。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.UcxReceiver, fragment: holoscan.core._core.Fragment, buffer: holoscan::UcxSerializationBuffer = None, capacity: int = 1, policy: int = 2, address: str = '0.0.0.0', port: int = 13337, name: str = 'ucx_receiver') → None
使用双缓冲队列的 UCX 网络接收器。
新消息首先推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- bufferholoscan.resource.UcxSerializationBuffer
发射器使用的序列化缓冲区。
- capacityint, 可选
接收器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- addressstr,可选
发射器使用的 IP 地址。
- portint,可选
发射器使用的网络端口。
- namestr, 可选
接收器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property back_size
接收器队列后台的大小。
- property capacity
接收器队列主级的容量。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property size
接收器队列主级的大小。
- property spec
- class holoscan.resources.UcxSerializationBuffer
基类:
holoscan.gxf._gxf.GXFResource
UCX 序列化缓冲区。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- allocatorholoscan.resource.Allocator
张量组件的内存分配器。
- buffer_sizeint,可选
缓冲区的大小(以字节为单位)。
- namestr, 可选
序列化缓冲区的名称
属性
args
与组件关联的参数列表。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.UcxSerializationBuffer, fragment: holoscan.core._core.Fragment, allocator: holoscan.resources._resources.Allocator = None, buffer_size: int = 4096, name: str = 'serialization_buffer') → None
UCX 序列化缓冲区。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- allocatorholoscan.resource.Allocator
张量组件的内存分配器。
- buffer_sizeint,可选
缓冲区的大小(以字节为单位)。
- namestr, 可选
序列化缓冲区的名称
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec
- class holoscan.resources.UcxTransmitter
基类:
holoscan.resources._resources.Transmitter
使用双缓冲队列的 UCX 网络发送器。
消息在发布后被推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- bufferholoscan.resource.UcxSerializationBuffer
发射器使用的序列化缓冲区。
- capacityint, 可选
发送器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- receiver_addressstr,可选
发射器使用的 IP 地址。
- local_addressstr,可选
用于连接的本地 IP 地址。
- portint,可选
发射器使用的网络端口。
- local_portint,可选
用于连接的本地网络端口。
- maximum_connection_retriesint,可选
发射器重试建立连接的最大次数。
- namestr, 可选
发送器的名称。
属性
args
与组件关联的参数列表。 back_size
发送器队列后台的大小。 capacity
发送器队列主级容量。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 size
发送器队列主级大小。 spec 方法
add_arg
(*args, **kwargs)重载函数。 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.UcxTransmitter, fragment: holoscan.core._core.Fragment, buffer: holoscan::UcxSerializationBuffer = None, capacity: int = 1, policy: int = 2, receiver_address: str = '0.0.0.0', local_address: str = '0.0.0.0', port: int = 13337, local_port: int = 0, maximum_connection_retries: int = 10, name: str = 'ucx_transmitter') → None
使用双缓冲队列的 UCX 网络发送器。
消息在发布后被推送到后台。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- bufferholoscan.resource.UcxSerializationBuffer
发射器使用的序列化缓冲区。
- capacityint, 可选
发送器的容量。
- policyint, 可选
要使用的策略 (0=弹出, 1=拒绝, 2=故障)。
- receiver_addressstr,可选
发射器使用的 IP 地址。
- local_addressstr,可选
用于连接的本地 IP 地址。
- portint,可选
发射器使用的网络端口。
- local_portint,可选
用于连接的本地网络端口。
- maximum_connection_retriesint,可选
发射器重试建立连接的最大次数。
- namestr, 可选
发送器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property back_size
发送器队列后台的大小。
- property capacity
发送器队列主级的容量。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property size
发送器队列主级的大小。
- property spec
- class holoscan.resources.UnboundedAllocator
基类:
holoscan.resources._resources.Allocator
无界分配器。
此分配器使用无上限的动态内存分配。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- namestr, 可选
序列化器的名称。
属性
args
与组件关联的参数列表。 block_size
获取分配器的块大小。 description
描述资源的 YAML 格式字符串。 fragment
资源所属的 Fragment。 gxf_cid
GXF 组件 ID。 gxf_cname
组件的名称。 gxf_context
组件的 GXF 上下文。 gxf_eid
GXF 实体 ID。 gxf_typename
组件的 GXF 类型名称。 id
组件的标识符。 name
资源的名称。 resource_type
资源类型。 spec 方法
add_arg
(*args, **kwargs)重载函数。 allocate
(self, size, type)分配请求的内存量。 free
(self, pointer)释放已分配的内存 gxf_initialize
(self)初始化组件。 initialize
(self)资源的初始化方法。 is_available
(self, size)表示资源是否可用的布尔值。 setup
(self, arg0)资源的 setup 方法。 ResourceType - class ResourceType
基类:
pybind11_builtins.pybind11_object
成员
NATIVE
GXF
属性
value - GXF = <ResourceType.GXF: 1>
- NATIVE = <ResourceType.NATIVE: 0>
- __init__(self: holoscan.core._core.Resource.ResourceType, value: int) → None
- property name
- property value
- __init__(self: holoscan.resources._resources.UnboundedAllocator, fragment: holoscan.core._core.Fragment, name: str = 'unbounded_allocator') → None
无界分配器。
此分配器使用无上限的动态内存分配。
- 参数
- fragmentholoscan.core.Fragment (仅限构造函数)
要将资源分配到的 Fragment。
- namestr, 可选
序列化器的名称。
- add_arg(*args, **kwargs)
重载函数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.Arg) -> None
向组件添加参数。
add_arg(self: holoscan.core._core.ComponentBase, arg: holoscan.core._core.ArgList) -> None
向组件添加参数列表。
- allocate(self: holoscan.resources._resources.Allocator, size: int, type: holoscan.resources._resources.MemoryStorageType) → int
分配请求的内存量。
- 参数
- sizeint
要分配的内存量
- typeholoscan.resources.MemoryStorageType
枚举,表示要分配的内存类型。
- 返回值
- 不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property args
与组件关联的参数列表。
- 返回值
- arglistholoscan.core.ArgList
- property block_size
获取分配器的块大小。
- 返回值
- int
分配器的块大小。字节型分配器返回 1。
- property description
描述资源的 YAML 格式字符串。
- property fragment
资源所属的 Fragment。
- 返回值
- nameholoscan.core.Fragment
- free(self: holoscan.resources._resources.Allocator, pointer: int) → None
释放已分配的内存
- 参数
- pointerPyCapsule
不透明的 PyCapsule 对象,表示指向已分配内存的 std::byte* 指针。
- property gxf_cid
GXF 组件 ID。
- property gxf_cname
组件的名称。
- property gxf_context
组件的 GXF 上下文。
- property gxf_eid
GXF 实体 ID。
- gxf_initialize(self: holoscan.gxf._gxf.GXFComponent) → None
初始化组件。
- property gxf_typename
组件的 GXF 类型名称。
- 返回值
- str
组件的 GXF 类型名称。
- property id
组件的标识符。
标识符初始设置为
-1
,并在组件初始化后变为有效值。使用默认执行器 (holoscan.gxf.GXFExecutor) 时,标识符设置为 GXF 组件 ID。
- 返回值
- idint
- initialize(self: holoscan.core._core.Resource) → None
资源的初始化方法。
- is_available(self: holoscan.resources._resources.Allocator, size: int) → bool
表示资源是否可用的布尔值。
- 返回值
- bool
资源的可用性。
- property name
资源的名称。
- 返回值
- namestr
- property resource_type
资源类型。
holoscan.core.Resource.ResourceType 枚举,表示资源的类型。当前实现的两种类型为 NATIVE 和 GXF。
- setup(self: holoscan.core._core.Resource, arg0: holoscan.core._core.ComponentSpec) → None
资源的 setup 方法。
- property spec