Name
read_aop_knowledgeT_read_aop_knowledgeReadAopKnowledgeReadAopKnowledge — Load knowledge about hardware dependent behavior of automatic operator
parallelization.
void ReadAopKnowledge(const HTuple& FileName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Attributes, HTuple* OperatorNames)
static HTuple HSystem::ReadAopKnowledge(const HString& FileName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* OperatorNames)
static HTuple HSystem::ReadAopKnowledge(const HString& FileName, const HString& GenParamName, const HString& GenParamValue, HString* OperatorNames)
static HTuple HSystem::ReadAopKnowledge(const char* FileName, const char* GenParamName, const char* GenParamValue, HString* OperatorNames)
static void HOperatorSet.ReadAopKnowledge(HTuple fileName, HTuple genParamName, HTuple genParamValue, out HTuple attributes, out HTuple operatorNames)
static HTuple HSystem.ReadAopKnowledge(string fileName, HTuple genParamName, HTuple genParamValue, out HTuple operatorNames)
static HTuple HSystem.ReadAopKnowledge(string fileName, string genParamName, string genParamValue, out string operatorNames)
read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledgeReadAopKnowledge loads the automatic operator parallelization
(AOP) knowledge of HALCON operators from file. The knowledge is used to
better utilize multiprocessor hardware in order to speed up the processing
of operators. To optimize the automatic operator parallelization,
HALCON needs some knowledge about the speed of operators on the used
hardware. This hardware-specific knowledge
can be obtained and stored by calling the operator optimize_aopoptimize_aopOptimizeAopOptimizeAopOptimizeAop
and write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledgeWriteAopKnowledge, respectively.
With read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledgeReadAopKnowledge, it is possible to load this knowledge
explicitly from a binary file. In doing so, FileNameFileNameFileNameFileNamefileName denotes the
name of this file (incl. path and file extension). If an empty string
''"""""""" is passed to FileNameFileNameFileNameFileNamefileName, HALCON reads the knowledge
from the specific file '.aop_info'".aop_info"".aop_info"".aop_info"".aop_info" in the HALCON installation
directory (Linux/macOS) or within the common application data folder
(Windows). This file is read by HALCON automatically during the
initialization phase but can easily be re-read by
read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledgeReadAopKnowledge. The read knowledge updates the system's
parallelization information and can be controlled by pairs of additional
parameter values passed to GenParamNameGenParamNameGenParamNameGenParamNamegenParamName and GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue.
Every entry in GenParamNameGenParamNameGenParamNameGenParamNamegenParamName must have one corresponding,
specifying entry in GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue, meaning that the tuples
passed to the parameters must have the same length. GenParamNameGenParamNameGenParamNameGenParamNamegenParamName
supports the values in following list, describing the possible applicable
values for GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue:
- 'ignore_attrib'"ignore_attrib""ignore_attrib""ignore_attrib""ignore_attrib"
-
suppresses to check knowledge attributes.
E.g., while reading the file read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledgeReadAopKnowledge checks whether
its content was written for the currently used computer and whether the
contained parallelization information regards the currently used HALCON
version, revision, and architecture. The attributes to suppress are
specified by passing any of the following values to
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue:
- 'host'"host""host""host""host"
the host name of the current machine
- 'cpu_info'"cpu_info""cpu_info""cpu_info""cpu_info"
the machine topology information
- 'variant'"variant""variant""variant""variant"
the HALCON variant
- 'version'"version""version""version""version"
the HALCON version
- 'revision'"revision""revision""revision""revision"
the HALCON revision
- 'architecture'"architecture""architecture""architecture""architecture"
the HALCON architecture
Multiple suppressions of attribute checks are possible.
- 'mode'"mode""mode""mode""mode"
-
sets the way how the system's information gets
updated.
- 'truncate'"truncate""truncate""truncate""truncate"
for GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue deletes
all the existing information before the new knowledge loaded from file
is added.
- 'renew'"renew""renew""renew""renew"
overwrites existing knowledge and adds new one
(default).
- 'append'"append""append""append""append"
keeps all existing operator information and just
adds the knowledge not already contained.
- 'nil'"nil""nil""nil""nil"
refuses any updates but returns the
knowledge attributes in AttributesAttributesAttributesAttributesattributes and all the operators
contained in file in OperatorNamesOperatorNamesOperatorNamesOperatorNamesoperatorNames.
- 'operator'"operator""operator""operator""operator"
denotes that the corresponding index value of
GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue contains an operator name. Multiple definitions
of operators are possible. By default, information of any contained
operator is loaded.
- 'iconic_type'"iconic_type""iconic_type""iconic_type""iconic_type"
focuses on AOP information for a specific
iconic type, specified by following values of GenParamValueGenParamValueGenParamValueGenParamValuegenParamValue:
'byte'"byte""byte""byte""byte",'uint2'"uint2""uint2""uint2""uint2",'real'"real""real""real""real",'int1'"int1""int1""int1""int1",
'int2'"int2""int2""int2""int2",'int4'"int4""int4""int4""int4",'int8'"int8""int8""int8""int8",'direction'"direction""direction""direction""direction",
'vector_field'"vector_field""vector_field""vector_field""vector_field",'cyclic'"cyclic""cyclic""cyclic""cyclic",'vector_field'"vector_field""vector_field""vector_field""vector_field",
'complex'"complex""complex""complex""complex",'region'"region""region""region""region",'xld'"xld""xld""xld""xld". Multiple definitions
of iconic types are possible.
The names of updated operators are returned in OperatorNamesOperatorNamesOperatorNamesOperatorNamesoperatorNames,
the attributes of the read knowledge in AttributesAttributesAttributesAttributesattributes. The latter
tuple codes the following meaning by index beginning with index 0 in
corresponding order: host name, HALCON variant, HALCON version,
HALCON revision, HALCON architecture.
- Multithreading type: exclusive (runs in parallel only with independent operators).
- Multithreading scope: global (may be called from any thread).
- Processed without parallelization.
Name of knowledge file
Default value:
''
""
""
""
""
Parameter name
Default value:
'none'
"none"
"none"
"none"
"none"
Suggested values: 'none'"none""none""none""none", 'ignore_attrib'"ignore_attrib""ignore_attrib""ignore_attrib""ignore_attrib", 'operator'"operator""operator""operator""operator", 'iconic_type'"iconic_type""iconic_type""iconic_type""iconic_type", 'mode'"mode""mode""mode""mode"
Parameter value
Number of elements: GenParamName == GenParamValue
Default value:
'none'
"none"
"none"
"none"
"none"
Suggested values: 'none'"none""none""none""none", 'host_name'"host_name""host_name""host_name""host_name", 'variant'"variant""variant""variant""variant", 'architecture'"architecture""architecture""architecture""architecture", 'version'"version""version""version""version", 'revision'"revision""revision""revision""revision", 'byte'"byte""byte""byte""byte", 'int1'"int1""int1""int1""int1", 'int2'"int2""int2""int2""int2", 'uint2'"uint2""uint2""uint2""uint2", 'int4'"int4""int4""int4""int4", 'int8'"int8""int8""int8""int8", 'direction'"direction""direction""direction""direction", 'cyclic'"cyclic""cyclic""cyclic""cyclic", 'vector_field'"vector_field""vector_field""vector_field""vector_field", 'complex'"complex""complex""complex""complex", 'region'"region""region""region""region", 'xld'"xld""xld""xld""xld", 'xld_cont'"xld_cont""xld_cont""xld_cont""xld_cont", 'xld_poly'"xld_poly""xld_poly""xld_poly""xld_poly", 'nil'"nil""nil""nil""nil", 'truncate'"truncate""truncate""truncate""truncate", 'replace'"replace""replace""replace""replace", 'renew'"renew""renew""renew""renew", 'append'"append""append""append""append"
read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledgeReadAopKnowledge returns 2 (H_MSG_TRUE) if all parameters are correct and
the file could be read. If necessary, an exception is raised.
Foundation