Skip to content

read_aop_knowledgeReadAopKnowledgeReadAopKnowledgeread_aop_knowledgeT_read_aop_knowledge🔗

説明🔗

read_aop_knowledgeReadAopKnowledgeReadAopKnowledgeread_aop_knowledgeT_read_aop_knowledge — 自動オペレーター並列化のハードウェア依存動作についての情報を 読み込む。

書式🔗

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 )

説明🔗

read_aop_knowledgeReadAopKnowledgeは HALCON オペレーターの自動オペレーター並 列化(AOP)情報をファイルから読み込みます。HALCON システムが保持す るこの情報は、オペレーター処理をスピードアップするために、マルチプ ロセッサハードウェアを最適に利用するのに使用されます。自動オペ レーター並列化を最適化するために、使用されるハードウェ アでのオペレーターのスピードに関する特定の情報が必要です。このハー ドウェアに関する特定の情報は、オペレーター optimize_aopOptimizeAop と write_aop_knowledgeWriteAopKnowledge を呼び出すことでそれぞれ取得および 保存できます。

read_aop_knowledgeReadAopKnowledge を利用して、この情報を明示的にバイナリ ファイルから読み込むことができます。ここで、FileNamefileNamefile_name は読み込む ファイルの名前(パスとファイル拡張子を含む)です。空の文字列 ''"" を FileNamefileNamefile_name に渡すと、HALCON は、HALCON のイ ンストールディレクトリ(Linux)または共通のアプリケーション データフォルダー(Windows)内の特定の .aop_info ファイルからこの情 報を読み込みます。このファイルは、初期化中に HALCON によって自動的 に読み込まれますが、read_aop_knowledgeReadAopKnowledge を実行することで、明示的に再読み込みすることができます。 読み込んだ情報は、システムの並列化情報を更新し、 GenParamNamegenParamNamegen_param_name と GenParamValuegenParamValuegen_param_value に渡される追加のパラメー ター値のペアで制御することができます。GenParamNamegenParamNamegen_param_name の各エントリには、 GenParamValuegenParamValuegen_param_value の対応するエントリが必要です。つまり、パラメー ターに渡される各 tuple の長さは同じである必要があります。 GenParamNamegenParamNamegen_param_name は、以下のリストの値をサポートします。このリス トでは、GenParamValuegenParamValuegen_param_value に適用できる値を説明します。

  • 'ignore_attrib'"ignore_attrib"は、情報の属性のチェックを省略します。 例えば、ロード時に、read_aop_knowledgeReadAopKnowledge は、その内容が現在 使用しているコンピュータに対応しているかどうか、そして含まれる並 列化情報が使用している HALCON のバージョン、リビジョン、および アーキテクチャに適合しているかどうかをチェックします。 GenParamValuegenParamValuegen_param_value に以下の値のいずれかを渡すことで、省略する 属性を指定します。

    • 'host'"host" 現在のマシンのホスト名

    • 'cpu_info'"cpu_info" マシンのトポロジ情報

    • 'variant'"variant" HALCON のバリエーション

    • 'version'"version" HALCON のバージョン

    • 'revision'"revision" HALCON のリビジョン

    • 'architecture'"architecture" HALCON のアーキテクチャ

    一度に複数の属性チェックを省略することができます。

  • 'mode'"mode" は、システムの情報を更新する方法を設定します。 GenParamValuegenParamValuegen_param_value に

    • 'truncate'"truncate" を設定すると、 ファイルから読み込まれる新しい情報が追加される前に、既存のすべ ての情報が削除されます。

    • 'renew'"renew" は、既存の情報を上書きし、新しい情報を追 加します(デフォルト)。

    • 'append'"append" は、既存のすべてのオペレーター情報を維持 し、まだ含まれていない情報を追加するだけです。

    • 'nil'"nil" は、更新しませんが、Attributesattributesattributes で 情報の属性、および OperatorNamesoperatorNamesoperator_names でファイルに含まれてい るすべてのオペレーターを返します。

  • 'operator'"operator" では、GenParamValuegenParamValuegen_param_valueの値には最適化を 行うパラメーター名を記述します。複数のオペレーターを指定することも 可能です。デフォルトでは、含まれているすべてのオペレーターの情報が 読み込まれます。

  • 'iconic_type'"iconic_type" は、GenParamValuegenParamValuegen_param_value の以下の値で 指定される特定の画像タイプの AOP 情報に焦点を絞ります: 'byte'"byte",'uint2'"uint2",'real'"real",'int1'"int1", 'int2'"int2",'int4'"int4",'int8'"int8",'direction'"direction", 'vector_field'"vector_field",'cyclic'"cyclic", 'complex'"complex",'region'"region",'xld'"xld" 複数の画像タイプを指定することも 可能です。

更新されたオペレーターの名前は OperatorNamesoperatorNamesoperator_names で返され、 読み込んだ情報の属性は Attributesattributesattributes で返されます。後者の tuple は、0から始まるインデックスで、順にホスト名、HALCON のバリ エーション、HALCONのバージョン、HALCONのリビジョン、HALCONの アーキテクチャを意味します。

実行情報🔗

実行情報
  • マルチスレッドタイプ: 排他的(オペレーターに独立して並列に動作)

  • マルチスレッドスコープ: グローバル(他のスレッドから呼び出される可能性あり)

  • 並列演算処理には未対応

パラメーター🔗

FileNamefileNamefile_name (input_control) filename.read → (string)HTuple (HString)HTuple (string)strHtuple (char*)

情報ファイル名

初期値: ''""

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

パラメーターの名前

初期値: 'none'"none"
推奨値: '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)

パラメーターの値

要素数: GenParamName == GenParamValue
初期値: 'none'"none"
推奨値: '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*)

情報の属性

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

更新対象のオペレーター

結果🔗

read_aop_knowledgeReadAopKnowledge は、すべてのパラメーターが正しく、ファ イルの読み取りが可能な場合、2 (H_MSG_TRUE) を返します。必要に応じて、 例外が発生します。

モジュール🔗

Foundation