read_aop_knowledge — Loads knowledge about hardware dependent behaviour of automatic operator parallelization.
read_aop_knowledge 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_aop and write_aop_knowledge, respectively.
With read_aop_knowledge, it is possible to load this knowledge explicitly from a binary file. In doing so, FileName denotes the name of this file (incl. path and file extension). If an empty string '' is passed to FileName, HALCON reads the knowledge from the specific file '.aop_info' in the HALCON installation directory (Linux/Mac OS X) 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_knowledge. The read knowledge updates the system's parallelization information and can be controlled by pairs of additional parameter values passed to ParamName and ParamValue. Every entry in ParamName must have one corresponding, specifying entry in ParamValue, meaning that the tuples passed to the parameters must have the same length. ParamName supports the values in following list, describing the possible applicable values for ParamValue:
suppresses to check knowledge attributes. E.g., while reading the file read_aop_knowledge 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 ParamValue:
the host name of the current machine
the machine topology information
the HALCON variant
the HALCON version
the HALCON revision
the HALCON architecture
Multiple suppressions of attribute checks are possible.
sets the way how the system's information gets updated.
for ParamValue deletes all the existing information before the new knowledge loaded from file is added.
overwrites existing knowledge and adds new one (default).
keeps all existing operator information and just adds the knowledge not already contained.
refuses any updates but returns the knowledge attributes in Attributes and all the operators contained in file in OperatorNames.
denotes that the corresponding index value of ParamValue contains an operator name. Multiple definitions of operators are possible. By default, information of any contained operator is loaded.
focuses on AOP information for a specific iconic type, specified by following values of ParamValue: 'byte','uint2','real','int1', 'int2','int4','int8','direction', 'vector_field','cyclic','vector_field', 'complex','region','xld'. Multiple definitions of iconic types are possible.
The names of updated operators are returned in OperatorNames, the attributes of the read knowledge in Attributes. 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.
Name of knowledge file
Default value: ''
Default value: 'none'
Suggested values: 'none', 'ignore_attrib', 'operator', 'iconic_type', 'mode'
Number of elements: ParamName == ParamValue
Default value: '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'
read_aop_knowledge returns 2 (H_MSG_TRUE) if all parameters are correct and the file could be read. If necessary, an exception is raised.