get_aop_infoT_get_aop_infoGetAopInfoGetAopInfoget_aop_info (算子)
名称
get_aop_infoT_get_aop_infoGetAopInfoGetAopInfoget_aop_info — 为算子返回 AOP(Automatic Operator Parallelization,自动算子并行化)信息。
签名
void GetAopInfo(const HTuple& OperatorName, const HTuple& IndexName, const HTuple& IndexValue, const HTuple& InfoName, HTuple* InfoValue)
static HTuple HSystem::GetAopInfo(const HTuple& OperatorName, const HTuple& IndexName, const HTuple& IndexValue, const HString& InfoName)
static HString HSystem::GetAopInfo(const HString& OperatorName, const HTuple& IndexName, const HTuple& IndexValue, const HString& InfoName)
static HString HSystem::GetAopInfo(const char* OperatorName, const HTuple& IndexName, const HTuple& IndexValue, const char* InfoName)
static HString HSystem::GetAopInfo(const wchar_t* OperatorName, const HTuple& IndexName, const HTuple& IndexValue, const wchar_t* InfoName)
(
Windows only)
static void HOperatorSet.GetAopInfo(HTuple operatorName, HTuple indexName, HTuple indexValue, HTuple infoName, out HTuple infoValue)
static HTuple HSystem.GetAopInfo(HTuple operatorName, HTuple indexName, HTuple indexValue, string infoName)
static string HSystem.GetAopInfo(string operatorName, HTuple indexName, HTuple indexValue, string infoName)
描述
HALCON supports a mechanism to optimize the behavior of automatic operator
parallelization (AOP) for a given hardware of a machine. The
information for this optimization can be determined by the operator
optimize_aopoptimize_aopOptimizeAopOptimizeAopOptimizeAopoptimize_aop and can also be partly modified by the operator
set_aop_infoset_aop_infoSetAopInfoSetAopInfoSetAopInfoset_aop_info。
To address specific AOP information, the operator's optimization data
is indexed within
a 3-ary hierarchy that can be obtained by query_aop_infoquery_aop_infoQueryAopInfoQueryAopInfoQueryAopInfoquery_aop_info。The
three hierarchy stages are indexed by the operator name, passed in
OperatorNameOperatorNameOperatorNameOperatorNameoperatorNameoperator_name, the iconic type, and
a parameter string value denoting a special mode or method supported by the
indexed operator. The latter two indices are passed by IndexNameIndexNameIndexNameIndexNameindexNameindex_name
and IndexValueIndexValueIndexValueIndexValueindexValueindex_value. IndexNameIndexNameIndexNameIndexNameindexNameindex_name holds the dimension
identifier whereas IndexValueIndexValueIndexValueIndexValueindexValueindex_value holds the index value as returned
in query_aop_infoquery_aop_infoQueryAopInfoQueryAopInfoQueryAopInfoquery_aop_info。
get_aop_infoget_aop_infoGetAopInfoGetAopInfoGetAopInfoget_aop_info returns the specific information parts of an operator's
AOP knowledge in InfoValueInfoValueInfoValueInfoValueinfoValueinfo_value if exactly one index per stage was set.
The scope of information is specified by InfoNameInfoNameInfoNameInfoNameinfoNameinfo_name and supports
following values:
- 'max_threads'"max_threads""max_threads""max_threads""max_threads""max_threads"
returns the maximum allowed thread number.
If no optimization data is stored, InfoValueInfoValueInfoValueInfoValueinfoValueinfo_value contains
-1. In case the specified operator does not support automatic
parallelization, 1 is returned.
- 'split_level'"split_level""split_level""split_level""split_level""split_level"
returns all allowed data
split levels of the automatic parallelization for this operator, the
specified iconic type and parameter value. Possible levels are
'split_tuple'"split_tuple""split_tuple""split_tuple""split_tuple""split_tuple", 'split_channel'"split_channel""split_channel""split_channel""split_channel""split_channel",
'split_domain'"split_domain""split_domain""split_domain""split_domain""split_domain", and 'split_partial'"split_partial""split_partial""split_partial""split_partial""split_partial". If no split
level is supported or every level was switched off for the indexed
operator an empty string ''"""""""""" is returned. Use
get_operator_infoget_operator_infoGetOperatorInfoGetOperatorInfoGetOperatorInfoget_operator_info to query all split levels generally supported by
an operator.
- 'model'"model""model""model""model""model"
returns the stored model type. Possible values
are 'threshold'"threshold""threshold""threshold""threshold""threshold", 'linear'"linear""linear""linear""linear""linear", and 'mlp'"mlp""mlp""mlp""mlp""mlp"
(see also the description of operator optimize_aopoptimize_aopOptimizeAopOptimizeAopOptimizeAopoptimize_aop). If
no optimization data is stored, an empty string is returned.
执行信息
- 多线程类型:独占(仅与独立算子并行运行)。
- 多线程作用域:局部(仅可在创建窗口、模型或工具实例的同一线程中调用)。
- 未采用并行化处理。
参数
OperatorNameOperatorNameOperatorNameOperatorNameoperatorNameoperator_name (输入控制) string → HTupleUnion[str, int]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Operator to get information for
建议值:
'mean_image'"mean_image""mean_image""mean_image""mean_image""mean_image", 'opening_circle'"opening_circle""opening_circle""opening_circle""opening_circle""opening_circle", 'find_shape_model'"find_shape_model""find_shape_model""find_shape_model""find_shape_model""find_shape_model"
IndexNameIndexNameIndexNameIndexNameindexNameindex_name (输入控制) string-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Further index stages
默认值:
['iconic_type','parameter:0']
["iconic_type","parameter:0"]
["iconic_type","parameter:0"]
["iconic_type","parameter:0"]
["iconic_type","parameter:0"]
["iconic_type","parameter:0"]
IndexValueIndexValueIndexValueIndexValueindexValueindex_value (输入控制) string-array → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Further index values
元素数量:
IndexName == IndexValue
默认值:
['byte','']
["byte",""]
["byte",""]
["byte",""]
["byte",""]
["byte",""]
InfoNameInfoNameInfoNameInfoNameinfoNameinfo_name (输入控制) string → HTuplestrHTupleHtuple (string) (string) (HString) (char*)
Scope of information
默认值:
'max_threads'
"max_threads"
"max_threads"
"max_threads"
"max_threads"
"max_threads"
建议值:
'max_threads'"max_threads""max_threads""max_threads""max_threads""max_threads", 'split_level'"split_level""split_level""split_level""split_level""split_level", 'model'"model""model""model""model""model"
InfoValueInfoValueInfoValueInfoValueinfoValueinfo_value (输出控制) string(-array) → HTupleSequence[str]HTupleHtuple (string) (string) (HString) (char*)
Value of information
结果
get_aop_infoget_aop_infoGetAopInfoGetAopInfoGetAopInfoget_aop_info 在所有参数正确时返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
模块
基础