"CompiledFunctionData" (コンパイルタイプ)
"CompiledFunctionData" (コンパイルタイプ)
"CompiledFunctionData"::[ty]
型 ty のコンパイルされた関数についての情報を保持する型を表す.
コンストラクタ
- "CompiledFunctionData"のインスタンスは,通常CurrentCompiledFunctionDataへのコンパイルされた呼出しによって生成される.
操作
- 型"CompiledFunctionData"のインスタンスでは,以下の操作を使うことができる:
-
obj["Name"] 関数名を返す.匿名の場合はUndefinedを返す obj["Type"] 関数の型を返す obj["ReturnType"] 関数の戻り型を返す
特性
- 型"CompiledFunctionData"の obj についてのInformation[obj,"Name"]は関数名を返す.
- 型"CompiledFunctionData"の obj についてのInformation[obj,"Type"]は関数の型を与える.
- 型"CompiledFunctionData"の obj についてのInformation[obj,"ReturnType"]は関数の戻り型を返す.
例題
例 (2)
comp = FunctionCompile[Function[Typed[arg, "Integer64"], Print[CurrentCompiledFunctionData[]]; {arg}]];
comp[10]CurrentCompiledFunctionDataが名前のある関数の中に現れると,これが含まれる:
decl = FunctionDeclaration[DemoFunc, Typed[{"Integer64"} -> "PackedArray"::["Integer64", 1]]@Function[{arg}, Print[CurrentCompiledFunctionData[]];{arg}]];comp = FunctionCompile[decl, Function[Typed[arg, "Integer64"], DemoFunc[arg]]];
comp[10]テクニカルノート
履歴
2025 で導入 (14.3)