FunctionCompileExportString[fspec]
関数指定 fspec をコンパイルして得られたテキストLLVMコードの文字列を与える.
FunctionCompileExportString[defs,fspec]
コンパイルに補助定義 defs を使う.
FunctionCompileExportString[fspec,"format"]
テキストコードの文字列を指定の形式で与える.


FunctionCompileExportString
FunctionCompileExportString[fspec]
関数指定 fspec をコンパイルして得られたテキストLLVMコードの文字列を与える.
FunctionCompileExportString[defs,fspec]
コンパイルに補助定義 defs を使う.
FunctionCompileExportString[fspec,"format"]
テキストコードの文字列を指定の形式で与える.
詳細とオプション

- 関数は,Function純関数として,純関数のリストとして,あるいは純関数の連想として与えることができる.
- 補助定義は,FunctionDeclarationでまたはCompilerEnvironmentオプションを与えることで与えられる.
- 次は,"format"の可能な値である.
-
"LLVM" LLVM中間コード "LLVMRaw" 生のLLVM中間コード "Assembler" 特定のアーキテクチャ用のアセンブラ "WolframIR" Wolfram中間コード "WolframFinalIR" 最終的なWolfram中間コード - 次は,使用可能なオプションである.
-
CompilerEnvironment Automatic コンパイルのための定義の環境 CompilerOptions Automatic コンパイルパイプラインの詳細オプション ProgressReporting Automatic コンパイル中の進捗状況の報告方法 TargetSystem Automatic ターゲットアーキテクチャの$SystemID - TargetSystem->Automaticの設定のとき,FunctionCompileExportStringは,実行中のマシンアーキテクチャ用のコードを,例えば単語長等を考慮して生成する.
- FunctionCompileExportString[func,…]の func はCompiledCodeFunctionオブジェクトでよい.
例題
すべて開く すべて閉じる例 (4)
関数のコンパイル版を生成し,結果のLLVM IRを文字列として返す:
関数のコンパイル版を生成し,結果のLLVM IRを文字列として返す:
FunctionCompileExportStringで複数の関数がコンパイルできる:
補助定義はFunctionDeclarationで与えられる:
オプション (3)
ProgressReporting (1)
ProgressReportingをFalseにすると報告されなくなる.
ProgressReportingのデフォルト値はAutomaticであるが,これは大域設定$ProgressReportingが使われることを意味する.これをFalseに設定すると,進捗状況は報告されなくなる.
TargetSystem (1)
デフォルト設定のAutomaticを使うと,実行中のマシンアーキテクチャ用のコードが生成される:
TargetSystemは,希望するプラットフォームの$SystemIDに設定することができる:
TargetSystemは異なる形式設定と組み合せることができる:
TargetSystemは,Wolfram Engineが存在しないアーキテクチャ用に設定することができる:
テクニカルノート
関連するガイド
テキスト
Wolfram Research (2019), FunctionCompileExportString, Wolfram言語関数, https://reference.wolfram.com/language/ref/FunctionCompileExportString.html (2025年に更新).
CMS
Wolfram Language. 2019. "FunctionCompileExportString." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. https://reference.wolfram.com/language/ref/FunctionCompileExportString.html.
APA
Wolfram Language. (2019). FunctionCompileExportString. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FunctionCompileExportString.html
BibTeX
@misc{reference.wolfram_2025_functioncompileexportstring, author="Wolfram Research", title="{FunctionCompileExportString}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionCompileExportString.html}", note=[Accessed: 05-October-2025]}
BibLaTeX
@online{reference.wolfram_2025_functioncompileexportstring, organization={Wolfram Research}, title={FunctionCompileExportString}, year={2025}, url={https://reference.wolfram.com/language/ref/FunctionCompileExportString.html}, note=[Accessed: 05-October-2025]}