set_aop_infoset_aop_infoSetAopInfoSetAopInfoset_aop_info (算子)
名称
set_aop_infoset_aop_infoSetAopInfoSetAopInfoset_aop_info — 为算子设置 AOP 信息。
签名
void SetAopInfo(const HTuple& OperatorName, const HTuple& IndexName, const HTuple& IndexValue, const HTuple& InfoName, const HTuple& InfoValue)
static void HSystem::SetAopInfo(const HTuple& OperatorName, const HTuple& IndexName, const HTuple& IndexValue, const HString& InfoName, const HTuple& InfoValue)
static void HSystem::SetAopInfo(const HString& OperatorName, const HString& IndexName, const HString& IndexValue, const HString& InfoName, Hlong InfoValue)
static void HSystem::SetAopInfo(const char* OperatorName, const char* IndexName, const char* IndexValue, const char* InfoName, Hlong InfoValue)
static void HSystem::SetAopInfo(const wchar_t* OperatorName, const wchar_t* IndexName, const wchar_t* IndexValue, const wchar_t* InfoName, Hlong InfoValue)
(
Windows only)
static void HOperatorSet.SetAopInfo(HTuple operatorName, HTuple indexName, HTuple indexValue, HTuple infoName, HTuple infoValue)
static void HSystem.SetAopInfo(HTuple operatorName, HTuple indexName, HTuple indexValue, string infoName, HTuple infoValue)
static void HSystem.SetAopInfo(string operatorName, string indexName, string indexValue, string infoName, int infoValue)
描述
HALCON supports a mechanism to adapt the behavior of automatic
parallelization of image processing operators (AOP) to the machine's
hardware capability. The
information for this adaption can be obtained by the operator
optimize_aopoptimize_aopOptimizeAopOptimizeAopOptimizeAopoptimize_aop and can also be partly read 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 addresses the index as returned
in query_aop_infoquery_aop_infoQueryAopInfoQueryAopInfoQueryAopInfoquery_aop_info。It is also possible to address multiple indices
on the same stage to set a specific information value to multiple knowledge
sets. Omitting an index name or passing an empty string as index value
addresses this stage in all. E.g., passing ''"""""""""" to
OperatorNameOperatorNameOperatorNameOperatorNameoperatorNameoperator_name, the tuple ['iconic_type','iconic_type']["iconic_type","iconic_type"]["iconic_type","iconic_type"]["iconic_type","iconic_type"]["iconic_type","iconic_type"]["iconic_type","iconic_type"] to
IndexNameIndexNameIndexNameIndexNameindexNameindex_name, and the tuple ['byte','uint2']["byte","uint2"]["byte","uint2"]["byte","uint2"]["byte","uint2"]["byte","uint2"] to
IndexValueIndexValueIndexValueIndexValueindexValueindex_value addresses all operators processing byte or uint2
images.
set_aop_infoset_aop_infoSetAopInfoSetAopInfoSetAopInfoset_aop_info sets the specific information parts of an operator's
AOP knowledge passed in InfoValueInfoValueInfoValueInfoValueinfoValueinfo_value. The scope of information is
specified by InfoNameInfoNameInfoNameInfoNameinfoNameinfo_name and supports the following:
- 'max_threads'"max_threads""max_threads""max_threads""max_threads""max_threads"
sets the maximum allowed thread number
this operator is allowed to run with the specified iconic type and
parameter value.
- 'split_level'"split_level""split_level""split_level""split_level""split_level"
sets the 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".
注意
set_aop_infoset_aop_infoSetAopInfoSetAopInfoSetAopInfoset_aop_info modifies the AOP system knowledge. These modifications
will also be stored by write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledgeWriteAopKnowledgewrite_aop_knowledge。It is advisable to
have a backup knowledge file before modifying the system knowledge.
执行信息
- 多线程类型:独占(仅与独立算子并行运行)。
- 多线程作用域:局部(仅可在创建窗口、模型或工具实例的同一线程中调用)。
- 未采用并行化处理。
参数
OperatorNameOperatorNameOperatorNameOperatorNameoperatorNameoperator_name (输入控制) string(-array) → HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Operator to set information to
默认值:
''
""
""
""
""
""
IndexNameIndexNameIndexNameIndexNameindexNameindex_name (输入控制) string(-array) → HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Further specific index
默认值:
''
""
""
""
""
""
建议值:
'iconic_type'"iconic_type""iconic_type""iconic_type""iconic_type""iconic_type", ['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) → HTupleMaybeSequence[Union[str, int]]HTupleHtuple (string / integer) (string / int / long) (HString / Hlong) (char* / Hlong)
Further specific address
元素数量:
IndexName == IndexValue
默认值:
''
""
""
""
""
""
建议值:
'byte'"byte""byte""byte""byte""byte", ['uint2','']["uint2",""]["uint2",""]["uint2",""]["uint2",""]["uint2",""]
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", 'model'"model""model""model""model""model"
InfoValueInfoValueInfoValueInfoValueinfoValueinfo_value (输入控制) integer(-array) → HTupleMaybeSequence[int]HTupleHtuple (integer) (int / long) (Hlong) (Hlong)
AOP information value
结果
set_aop_infoset_aop_infoSetAopInfoSetAopInfoSetAopInfoset_aop_info 在所有参数正确时返回 2 ( H_MSG_TRUE )。如有必要,则抛出异常。
模块
基础