Skip to content

read_aop_knowledgeReadAopKnowledgeReadAopKnowledgeread_aop_knowledgeT_read_aop_knowledgeπŸ”—

Short descriptionπŸ”—

read_aop_knowledgeReadAopKnowledgeReadAopKnowledgeread_aop_knowledgeT_read_aop_knowledge β€” Load knowledge about hardware dependent behavior of automatic operator parallelization.

SignatureπŸ”—

read_aop_knowledge( filename.read FileName, string GenParamName, string GenParamValue, out string Attributes, out string OperatorNames )void ReadAopKnowledge( const HTuple& FileName, const HTuple& GenParamName, const HTuple& GenParamValue, HTuple* Attributes, HTuple* OperatorNames )static void HOperatorSet.ReadAopKnowledge( HTuple fileName, HTuple genParamName, HTuple genParamValue, out HTuple attributes, out HTuple operatorNames )def read_aop_knowledge( file_name: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[str, int, float]] ) -> Tuple[Sequence[str], Sequence[str]]

def read_aop_knowledge_s( file_name: str, gen_param_name: MaybeSequence[str], gen_param_value: MaybeSequence[Union[str, int, float]] ) -> Tuple[Sequence[str], str]Herror T_read_aop_knowledge( 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 HTuple HSystem::ReadAopKnowledge( const wchar_t* FileName, const wchar_t* GenParamName, const wchar_t* GenParamValue, HString* OperatorNames ) (Windows only)

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 )

DescriptionπŸ”—

read_aop_knowledgeReadAopKnowledge 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_aopOptimizeAop and write_aop_knowledgeWriteAopKnowledge, respectively.

With read_aop_knowledgeReadAopKnowledge, it is possible to load this knowledge explicitly from a binary file. In doing so, FileNamefileNamefile_name denotes the name of this file (incl. path and file extension). If an empty string ''"" is passed to FileNamefileNamefile_name, HALCON reads the knowledge from the specific file .aop_info in the HALCON installation directory (Linux) 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_knowledgeReadAopKnowledge. The read knowledge updates the system’s parallelization information and can be controlled by pairs of additional parameter values passed to GenParamNamegenParamNamegen_param_name and GenParamValuegenParamValuegen_param_value. Every entry in GenParamNamegenParamNamegen_param_name must have one corresponding, specifying entry in GenParamValuegenParamValuegen_param_value, meaning that the tuples passed to the parameters must have the same length. GenParamNamegenParamNamegen_param_name supports the values in following list, describing the possible applicable values for GenParamValuegenParamValuegen_param_value:

  • 'ignore_attrib'"ignore_attrib" suppresses to check knowledge attributes. E.g., while reading the file read_aop_knowledgeReadAopKnowledge 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 GenParamValuegenParamValuegen_param_value:

    • 'host'"host" the host name of the current machine

    • 'cpu_info'"cpu_info" the machine topology information

    • 'variant'"variant" the HALCON variant

    • 'version'"version" the HALCON version

    • 'revision'"revision" the HALCON revision

    • 'architecture'"architecture" the HALCON architecture

    Multiple suppressions of attribute checks are possible.

  • 'mode'"mode" sets the way how the system’s information gets updated.

  • 'operator'"operator" denotes that the corresponding index value of GenParamValuegenParamValuegen_param_value contains an operator name. Multiple definitions of operators are possible. By default, information of any contained operator is loaded.

  • 'iconic_type'"iconic_type" focuses on AOP information for a specific iconic type, specified by following values of GenParamValuegenParamValuegen_param_value: 'byte'"byte",'uint2'"uint2",'real'"real",'int1'"int1", 'int2'"int2",'int4'"int4",'int8'"int8",'direction'"direction", 'vector_field'"vector_field",'cyclic'"cyclic",'vector_field'"vector_field", 'complex'"complex",'region'"region",'xld'"xld". Multiple definitions of iconic types are possible.

The names of updated operators are returned in OperatorNamesoperatorNamesoperator_names, the attributes of the read knowledge in Attributesattributesattributes. 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.

Execution informationπŸ”—

Execution information
  • Multithreading type: exclusive (runs in parallel only with independent operators).

  • Multithreading scope: global (may be called from any thread).

  • Processed without parallelization.

ParametersπŸ”—

FileNamefileNamefile_name (input_control) filename.read β†’ (string)HTuple (HString)HTuple (string)strHtuple (char*)

Name of knowledge file

Default: ''""

GenParamNamegenParamNamegen_param_name (input_control) string(-array) β†’ (string)HTuple (HString)HTuple (string)MaybeSequence[str]Htuple (char*)

Parameter name

Default: 'none'"none"
Suggested values: 'none', 'ignore_attrib', 'operator', 'iconic_type', 'mode'"none", "ignore_attrib", "operator", "iconic_type", "mode"

GenParamValuegenParamValuegen_param_value (input_control) string(-array) β†’ (string / integer / real)HTuple (HString / Hlong / double)HTuple (string / int / long / double)MaybeSequence[Union[str, int, float]]Htuple (char* / Hlong / double)

Parameter value

Number of elements: GenParamName == GenParamValue
Default: 'none'"none"
Suggested values: 'none', 'host_name', 'variant', 'architecture', 'version', 'revision', 'byte', 'int1', 'int2', 'uint2', 'int4', 'int8', 'direction', 'cyclic', 'vector_field', 'complex', 'region', 'xld', 'xld_cont', 'xld_poly', 'nil', 'truncate', 'replace', 'renew', 'append'"none", "host_name", "variant", "architecture", "version", "revision", "byte", "int1", "int2", "uint2", "int4", "int8", "direction", "cyclic", "vector_field", "complex", "region", "xld", "xld_cont", "xld_poly", "nil", "truncate", "replace", "renew", "append"

Attributesattributesattributes (output_control) string-array β†’ (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Knowledge attributes

OperatorNamesoperatorNamesoperator_names (output_control) string(-array) β†’ (string)HTuple (HString)HTuple (string)Sequence[str]Htuple (char*)

Updated Operators

ResultπŸ”—

read_aop_knowledgeReadAopKnowledge returns 2 (H_MSG_TRUE) if all parameters are correct and the file could be read. If necessary, an exception is raised.

ModuleπŸ”—

Foundation