WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center
Wolfram Language Home Page »

FunctionCompileExport

FunctionCompileExport ["file.ext",fspec]

exports a compiled version of functions fspec in the format specified by the file extension ext.

FunctionCompileExport [path,defs,fspec]

exports a compiled version of fspec using local auxiliary definitions defs.

FunctionCompileExport [path,fspec,"format"]

exports in the specified format.

FunctionCompileExport [path,defs,fspec,"format"]

exports a compiled version using local auxiliary definitions.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Export a compiled version of a function into a file:

The export format can be determined from the file name:

The export format can be given explicitly:

LLVM IR can be generated:

Several functions can be compiled with FunctionCompileExport :

It can be useful to use an association to hold the functions:

Auxiliary definitions can be given with FunctionDeclaration :

Options  (3)

CompilerEnvironment  (1)

Create a compiler environment and add a function definition:

Use a compiler environment in a compilation:

ProgressReporting  (1)

Progress during a compilation is reported:

This can be suppressed by setting the option ProgressReporting to False .

The default value of ProgressReporting is Automatic , which means that the global setting $ProgressReporting is used. If this is set to False , then no progress reporting takes place.

TargetSystem  (1)

The default setting of Automatic generates code for the machine architecture on which it is being run:

TargetSystem can be set to the $SystemID of the desired platform:

TargetSystem can be set for architectures for which the Wolfram Engine does not exist:

See Also

FunctionCompile   FunctionCompileExportString   FunctionCompileExportByteArray   FunctionCompileExportLibrary   TargetSystem   Export   FunctionDeclaration   CreateCompilerEnvironment

History

Introduced in 2019 (12.0) | Updated in 2021 (12.3)

Wolfram Research (2019), FunctionCompileExport, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExport.html (updated 2021).

Text

Wolfram Research (2019), FunctionCompileExport, Wolfram Language function, https://reference.wolfram.com/language/ref/FunctionCompileExport.html (updated 2021).

CMS

Wolfram Language. 2019. "FunctionCompileExport." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/FunctionCompileExport.html.

APA

Wolfram Language. (2019). FunctionCompileExport. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/FunctionCompileExport.html

BibTeX

@misc{reference.wolfram_2025_functioncompileexport, author="Wolfram Research", title="{FunctionCompileExport}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionCompileExport.html}", note=[Accessed: 25-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_functioncompileexport, organization={Wolfram Research}, title={FunctionCompileExport}, year={2021}, url={https://reference.wolfram.com/language/ref/FunctionCompileExport.html}, note=[Accessed: 25-April-2025 ]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /