ClassesClassesClassesClasses | | | | Operators

write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge (Operator)

Name

write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge — Writes knowledge about hardware dependent behaviour of automatic operator parallelization to file.

Signature

write_aop_knowledge( : : FileName, ParamName, ParamValue : )

Herror write_aop_knowledge(const char* FileName, const char* ParamName, const char* ParamValue)

Herror T_write_aop_knowledge(const Htuple FileName, const Htuple ParamName, const Htuple ParamValue)

Herror write_aop_knowledge(const HTuple& FileName, const HTuple& ParamName, const HTuple& ParamValue)

void WriteAopKnowledge(const HTuple& FileName, const HTuple& ParamName, const HTuple& ParamValue)

static void HSystem::WriteAopKnowledge(const HString& FileName, const HTuple& ParamName, const HTuple& ParamValue)

static void HSystem::WriteAopKnowledge(const HString& FileName, const HString& ParamName, const HString& ParamValue)

static void HSystem::WriteAopKnowledge(const char* FileName, const char* ParamName, const char* ParamValue)

void HOperatorSetX.WriteAopKnowledge(
[in] VARIANT FileName, [in] VARIANT ParamName, [in] VARIANT ParamValue)

void HSystemX.WriteAopKnowledge(
[in] BSTR FileName, [in] VARIANT ParamName, [in] VARIANT ParamValue)

static void HOperatorSet.WriteAopKnowledge(HTuple fileName, HTuple paramName, HTuple paramValue)

static void HSystem.WriteAopKnowledge(string fileName, HTuple paramName, HTuple paramValue)

static void HSystem.WriteAopKnowledge(string fileName, string paramName, string paramValue)

Description

write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge stores the automatic parallelization knowledge of HALCON operators to file. The knowledge hold by the HALCON system is used to better utilize multiprocessor hardware in order to speed up the processing of operators. To optimize the automatic parallelization of operators, HALCON needs some specific knowledge about the speed of operators on the used hardware. This hardware-specific knowledge can be obtained by calling the operator optimize_aopoptimize_aopOptimizeAopoptimize_aopOptimizeAopOptimizeAop or read from file by using read_aop_knowledgeread_aop_knowledgeReadAopKnowledgeread_aop_knowledgeReadAopKnowledgeReadAopKnowledge, respectively.

With write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge it is possible to store this knowledge explicitly in a binary file. At this, FileNameFileNameFileNameFileNameFileNamefileName denotes the name of this file (incl. path and file extension). If an empty string ''"""""""""" is passed to FileNameFileNameFileNameFileNameFileNamefileName, HALCON writes the knowledge to the specific file '.aop_info'".aop_info"".aop_info"".aop_info"".aop_info"".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 during the initialization phase automatically. write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge adds attributes to the knowledge like the host name and information about HALCON architecture, variant, version, and revision. This enables HALCON to write aop knowledge sets of different machines or HALCON systems into the same file. Therefore, write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge can control the updating of the files contents by a pair of 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:

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

sets the way how existing knowledge with same attributes would be updated in the file.

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

for ParamValueParamValueParamValueParamValueParamValueparamValue deletes the existing knowledge with matching attributes before the new information is added to file.

'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"

however refuses any update of the file but checks the user priviledges, i.e., if read write access is available.

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

denotes that the corresponding index value of ParamValueParamValueParamValueParamValueParamValueparamValue contains an operator name. It delimits the storage on a dedicated operator set. Multiple definitions of operators are possible. By default, information of any operator possessing AOP optimization data is written.

'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",ValRef{'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.

Parallelization

Parameters

FileNameFileNameFileNameFileNameFileNamefileName (input_control)  filename.write 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: 'mode'"mode""mode""mode""mode""mode", 'operator'"operator""operator""operator""operator""operator", 'iconic_type'"iconic_type""iconic_type""iconic_type""iconic_type""iconic_type"

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: 'truncate'"truncate""truncate""truncate""truncate""truncate", 'renew'"renew""renew""renew""renew""renew", 'append'"append""append""append""append""append"

Result

write_aop_knowledgewrite_aop_knowledgeWriteAopKnowledgewrite_aop_knowledgeWriteAopKnowledgeWriteAopKnowledge 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