ClassesClassesClassesClasses | | | | Operators

read_aop_knowledgeT_read_aop_knowledgeReadAopKnowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge (Operator)

Name

read_aop_knowledgeT_read_aop_knowledgeReadAopKnowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge — Load knowledge about hardware dependent behavior 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 ReadAopKnowledge(const HTuple& FileName, const HTuple& ParamName, const HTuple& ParamValue, HTuple* Attributes, HTuple* OperatorNames)

static HTuple HSystem::ReadAopKnowledge(const HString& FileName, const HTuple& ParamName, const HTuple& ParamValue, HTuple* OperatorNames)

static HTuple HSystem::ReadAopKnowledge(const HString& FileName, const HString& ParamName, const HString& ParamValue, HString* OperatorNames)

static HTuple HSystem::ReadAopKnowledge(const char* FileName, const char* ParamName, const char* ParamValue, HString* 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_knowledgeReadAopKnowledgeread_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_aopOptimizeAopoptimize_aopOptimizeAopOptimizeAop and write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge, respectively.

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

'ignore_attrib'"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_knowledgeReadAopKnowledgeread_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 ParamValueParamValueParamValueParamValueParamValueparamValue:

'host'"host""host""host""host""host"

the host name of the current machine

'cpu_info'"cpu_info""cpu_info""cpu_info""cpu_info""cpu_info"

the machine topology information

'variant'"variant""variant""variant""variant""variant"

the HALCON variant

'version'"version""version""version""version""version"

the HALCON version

'revision'"revision""revision""revision""revision""revision"

the HALCON revision

'architecture'"architecture""architecture""architecture""architecture""architecture"

the HALCON architecture

Multiple suppressions of attribute checks are possible.

'mode'"mode""mode""mode""mode""mode"

sets the way how the system's information gets updated.

'truncate'"truncate""truncate""truncate""truncate""truncate"

for ParamValueParamValueParamValueParamValueParamValueparamValue deletes all the existing information before the new knowledge loaded from file is added.

'renew'"renew""renew""renew""renew""renew"

overwrites existing knowledge and adds new one (default).

'append'"append""append""append""append""append"

keeps all existing operator information and just adds the knowledge not already contained.

'nil'"nil""nil""nil""nil""nil"

refuses any updates but returns the knowledge attributes in AttributesAttributesAttributesAttributesAttributesattributes and all the operators contained in file in OperatorNamesOperatorNamesOperatorNamesOperatorNamesOperatorNamesoperatorNames.

'operator'"operator""operator""operator""operator""operator"

denotes that the corresponding index value of ParamValueParamValueParamValueParamValueParamValueparamValue 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""iconic_type"

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

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

FileNameFileNameFileNameFileNameFileNamefileName (input_control)  filename.read HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Name of knowledge file

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

ParamNameParamNameParamNameParamNameParamNameparamName (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Parameter name

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

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

ParamValueParamValueParamValueParamValueParamValueparamValue (input_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string / integer / real) (string / int / long / double) (HString / Hlong / double) (char* / Hlong / double) (BSTR / Hlong / double) (char* / Hlong / double)

Parameter value

Number of elements: ParamName == ParamValue

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

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

AttributesAttributesAttributesAttributesAttributesattributes (output_control)  string-array HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Knowledge attributes

OperatorNamesOperatorNamesOperatorNamesOperatorNamesOperatorNamesoperatorNames (output_control)  string(-array) HTupleHTupleHTupleVARIANTHtuple (string) (string) (HString) (char*) (BSTR) (char*)

Updated Operators

Result

read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeread_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


ClassesClassesClassesClasses | | | | Operators