HALCON Reference Manual 10.0.2
Table of Contents / System / Parallelization ClassesClassesClasses | | | Operators

read_aop_knowledgeT_read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge (Operator)

Name

read_aop_knowledgeT_read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge — Loads knowledge about hardware dependent behaviour of automatic operator parallelization.

Signature

read_aop_knowledge( : : FileName, ParamName, ParamValue : Attributes, OperatorNames)

Herror T_read_aop_knowledge(const Htuple FileName, const Htuple ParamName, const Htuple ParamValue, Htuple* Attributes, Htuple* OperatorNames)

Herror read_aop_knowledge(const HTuple& FileName, const HTuple& ParamName, const HTuple& ParamValue, HTuple* Attributes, HTuple* OperatorNames)

void HOperatorSetX.ReadAopKnowledge(
[in] VARIANT FileName, [in] VARIANT ParamName, [in] VARIANT ParamValue, [out] VARIANT* Attributes, [out] VARIANT* OperatorNames)

VARIANT HSystemX.ReadAopKnowledge(
[in] BSTR FileName, [in] VARIANT ParamName, [in] VARIANT ParamValue, [out] VARIANT* OperatorNames)

static void HOperatorSet.ReadAopKnowledge(HTuple fileName, HTuple paramName, HTuple paramValue, out HTuple attributes, out HTuple operatorNames)

static HTuple HSystem.ReadAopKnowledge(string fileName, HTuple paramName, HTuple paramValue, out HTuple operatorNames)

static HTuple HSystem.ReadAopKnowledge(string fileName, string paramName, string paramValue, out string operatorNames)

Description

read_aop_knowledgeread_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge 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_aopoptimize_aopOptimizeAopOptimizeAop and write_aop_knowledgewrite_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge, respectively.

With read_aop_knowledgeread_aop_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge, 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/UNIX) 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_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge. The read knowledge updates the system's parallelization information and can be controlled by pairs of additional parameter values passed to ParamNameParamNameParamNameParamNameparamName and ParamValueParamValueParamValueParamValueparamValue. Every entry in ParamNameParamNameParamNameParamNameparamName must have one corresponding, specifying entry in ParamValueParamValueParamValueParamValueparamValue, meaning that the tuples passed to the parameters must have the same length. ParamNameParamNameParamNameParamNameparamName supports the values in following list, describing the possible applicable values for ParamValueParamValueParamValueParamValueparamValue:

'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_knowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge 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 ParamValueParamValueParamValueParamValueparamValue:

'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 ParamValueParamValueParamValueParamValueparamValue 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 ParamValueParamValueParamValueParamValueparamValue 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 ParamValueParamValueParamValueParamValueparamValue: '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.

Parallelization

Parameters

FileNameFileNameFileNameFileNamefileName (input_control)  filename.read HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Name of knowledge file

Default value: '' "" "" "" ""

ParamNameParamNameParamNameParamNameparamName (input_control)  string(-array) HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

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"

ParamValueParamValueParamValueParamValueparamValue (input_control)  string(-array) HTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Parameter value

Number of elements: ParamName == ParamValue

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"

AttributesAttributesAttributesAttributesattributes (output_control)  string-array HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Knowledge attributes

OperatorNamesOperatorNamesOperatorNamesOperatorNamesoperatorNames (output_control)  string(-array) HTupleHTupleVARIANTHtuple (string) (string) (char*) (BSTR) (char*)

Updated Operators

Result

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

Module

Foundation


Table of Contents / System / Parallelization ClassesClassesClasses | | | Operators
HALCON Reference Manual 10.0.2 Copyright © 1996-2011 MVTec Software GmbH