CompiledComponentRawInterface[comp]
コンパイル済みコンポーネントの生のインターフェースを表す.
CompiledComponentRawInterface
CompiledComponentRawInterface[comp]
コンパイル済みコンポーネントの生のインターフェースを表す.
詳細
- CompiledComponentRawInterface[comp]は,生のライブラリ関数宣言をFunctionCompileのようなコンパイル済みコマンドに加えるために使うことができる.
- コンパイル済みコンポーネントの宣言CompiledComponentRawInterface[comp]は,CreateCompilerEnvironmentおよびCompilerEnvironmentAppendToを使ってコンパイラ環境に生のライブラリ関数宣言を加えるために使うことができる.
- CompiledComponentRawInterfaceが与える生のライブラリ関数宣言は,DeclareCompiledComponentの"RawLibraryFunctions"で与えられる.これらは,規則"name"Typed[funcName,ty]として与えられる.これは,funcName の ty 型のコンパイル済みバージョンがこの成分のためにビルドされたライブラリによってエキスポートされるように指定する.
- CompiledComponentRawInterfaceが与える宣言を使ったコンパイルは,"RawLibraryFunctions"設定の funcName を直接参照する.
例題
例 (1)
CompiledComponentRawInterfaceは,コンパイル済みコンポーネントの宣言をコンパイルせずにライブラリから使用できるので便利である.
DeclareCompiledComponentは,他のコンパイル済みコードで使用する生のライブラリインターフェースが作成できる:
DeclareCompiledComponent["demoLibrary", {
FunctionDeclaration[square, Typed[{"Real64"} -> "Real64"]@Function[arg, arg ^ 2]]
}
];
DeclareCompiledComponent["demoLibrary", "RawLibraryFunctions" -> <|
"square" -> Typed[square, {"Real64"} -> "Real64"]
|>];BuildCompiledComponent["demoLibrary"]LoadCompiledComponent["demoLibrary"]libDecl = LibraryFunctionDeclaration[square -> "square", "demoLibrary", {"Real64"} -> "Real64"];cf = FunctionCompile[{libDecl}, Function[{Typed[arg, "Real64"]}, square[arg]]]cf[5.6]LibraryFunctionDeclarationを使う代りに,コンポーネントライブラリインターフェースを直接使うことができる:
cf = FunctionCompile[CompiledComponentRawInterface["demoLibrary"], Function[{Typed[arg, "Real64"]}, square[arg]]]cf[5.6]関連するガイド
関連リンク
テキスト
Wolfram Research (2024), CompiledComponentRawInterface, Wolfram言語関数, https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html.
CMS
Wolfram Language. 2024. "CompiledComponentRawInterface." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html.
APA
Wolfram Language. (2024). CompiledComponentRawInterface. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html
BibTeX
@misc{reference.wolfram_2026_compiledcomponentrawinterface, author="Wolfram Research", title="{CompiledComponentRawInterface}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html}", note=[Accessed: 12-September-2026]}
BibLaTeX
@online{reference.wolfram_2026_compiledcomponentrawinterface, organization={Wolfram Research}, title={CompiledComponentRawInterface}, year={2024}, url={https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html}, note=[Accessed: 12-September-2026]}