get_compute_device_paramT_get_compute_device_paramGetComputeDeviceParamGetComputeDeviceParamget_compute_device_param (算子)
名称
get_compute_device_paramT_get_compute_device_paramGetComputeDeviceParamGetComputeDeviceParamget_compute_device_param — 查询计算设备参数。
签名
描述
get_compute_device_paramget_compute_device_paramGetComputeDeviceParamGetComputeDeviceParamGetComputeDeviceParamget_compute_device_param returns parameters of the
compute device DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle for the current HALCON thread
in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value。
The following parameters can be queried (for more information
see set_compute_device_paramset_compute_device_paramSetComputeDeviceParamSetComputeDeviceParamSetComputeDeviceParamset_compute_device_param) by setting them for
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name:
- 'alloc_pinned'"alloc_pinned""alloc_pinned""alloc_pinned""alloc_pinned""alloc_pinned"
-
If 'true'"true""true""true""true""true", the output image matrices of all operators
are created in page locked (so called 'pinned') memory.
- 'asynchronous_execution'"asynchronous_execution""asynchronous_execution""asynchronous_execution""asynchronous_execution""asynchronous_execution"
-
If 'true'"true""true""true""true""true", operators executed on the compute device
do not wait for the device computations to finish but
return after initiation the computations.
- 'buffer_cache_capacity'"buffer_cache_capacity""buffer_cache_capacity""buffer_cache_capacity""buffer_cache_capacity""buffer_cache_capacity"
-
Maximum size (in bytes) of the compute device buffer cache.
- 'buffer_cache_used'"buffer_cache_used""buffer_cache_used""buffer_cache_used""buffer_cache_used""buffer_cache_used"
-
Current size (in bytes) of the compute device buffer cache.
- 'image_cache_capacity'"image_cache_capacity""image_cache_capacity""image_cache_capacity""image_cache_capacity""image_cache_capacity"
-
Maximum size (in bytes) of the compute device image cache.
- 'image_cache_used'"image_cache_used""image_cache_used""image_cache_used""image_cache_used""image_cache_used"
-
Current size (in bytes) of the compute device image cache.
- 'pinned_mem_cache_capacity'"pinned_mem_cache_capacity""pinned_mem_cache_capacity""pinned_mem_cache_capacity""pinned_mem_cache_capacity""pinned_mem_cache_capacity"
-
Maximum size (in bytes) of the page locked (pinned) memory
cache.
- 'pinned_mem_cache_used'"pinned_mem_cache_used""pinned_mem_cache_used""pinned_mem_cache_used""pinned_mem_cache_used""pinned_mem_cache_used"
Current size (in bytes) of the page locked (pinned) memory
cache.
执行信息
- 多线程类型:可重入(与非独占算子并行运行)。
- 多线程作用域:局部(仅可在创建窗口、模型或工具实例的同一线程中调用)。
- 未采用并行化处理。
参数
DeviceHandleDeviceHandleDeviceHandleDeviceHandledeviceHandledevice_handle (输入控制) compute_device → HComputeDevice, HTupleHHandleHTupleHtuple (handle) (IntPtr) (HHandle) (handle)
计算设备句柄。
GenParamNameGenParamNameGenParamNameGenParamNamegenParamNamegen_param_name (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Name of the parameter to query.
默认值:
'buffer_cache_capacity'
"buffer_cache_capacity"
"buffer_cache_capacity"
"buffer_cache_capacity"
"buffer_cache_capacity"
"buffer_cache_capacity"
值列表:
'alloc_pinned'"alloc_pinned""alloc_pinned""alloc_pinned""alloc_pinned""alloc_pinned", 'asynchronous_execution'"asynchronous_execution""asynchronous_execution""asynchronous_execution""asynchronous_execution""asynchronous_execution", 'buffer_cache_capacity'"buffer_cache_capacity""buffer_cache_capacity""buffer_cache_capacity""buffer_cache_capacity""buffer_cache_capacity", 'buffer_cache_used'"buffer_cache_used""buffer_cache_used""buffer_cache_used""buffer_cache_used""buffer_cache_used", 'image_cache_capacity'"image_cache_capacity""image_cache_capacity""image_cache_capacity""image_cache_capacity""image_cache_capacity", 'image_cache_used'"image_cache_used""image_cache_used""image_cache_used""image_cache_used""image_cache_used", 'pinned_mem_cache_capacity'"pinned_mem_cache_capacity""pinned_mem_cache_capacity""pinned_mem_cache_capacity""pinned_mem_cache_capacity""pinned_mem_cache_capacity", 'pinned_mem_cache_used'"pinned_mem_cache_used""pinned_mem_cache_used""pinned_mem_cache_used""pinned_mem_cache_used""pinned_mem_cache_used"
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValuegen_param_value (输出控制) string(-array) → HTupleSequence[Union[str, int, float]]HTupleHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double)
Value of the parameter.
结果
算子 get_compute_device_paramget_compute_device_paramGetComputeDeviceParamGetComputeDeviceParamGetComputeDeviceParamget_compute_device_param 在参数正确时返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
可能的前趋
activate_compute_deviceactivate_compute_deviceActivateComputeDeviceActivateComputeDeviceActivateComputeDeviceactivate_compute_device
另见
set_compute_device_paramset_compute_device_paramSetComputeDeviceParamSetComputeDeviceParamSetComputeDeviceParamset_compute_device_param,
get_compute_device_infoget_compute_device_infoGetComputeDeviceInfoGetComputeDeviceInfoGetComputeDeviceInfoget_compute_device_info
模块
基础