CompiledCodeFunction

CompiledCodeFunction[]

is a function created by FunctionCompile that contains compiled code that is run when the CompiledCodeFunction is applied to suitable arguments.

Details

Examples

open allclose all

Basic Examples  (1)

FunctionCompile creates a CompiledCodeFunction:

The CompiledCodeFunction evaluates with an argument of the correct type:

Information returns information about a CompiledCodeFunction:

Extract just the type signature for the function:

Scope  (3)

A CompiledCodeFunction contains information about how it was created, which can enable loading from a file. By default, platform-dependent byte code is included:

If a CompiledCodeFunction is written to a file and loaded, a new functioning CompiledCodeFunction is created. If byte code is found that matches the current platform, that will be used:

The restored CompiledCodeFunction works as expected:

Platform-dependent byte code can be created for a range of platforms. This can be used if the CompiledCodeFunction was loaded into a different system:

A shared library can be embedded in the output:

The library will be used when the code function is loaded from a file. This makes loading faster:

The restored CompiledCodeFunction works as expected:

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

Text

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

BibTeX

@misc{reference.wolfram_2021_compiledcodefunction, author="Wolfram Research", title="{CompiledCodeFunction}", year="2019", howpublished="\url{https://reference.wolfram.com/language/ref/CompiledCodeFunction.html}", note=[Accessed: 26-October-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_compiledcodefunction, organization={Wolfram Research}, title={CompiledCodeFunction}, year={2019}, url={https://reference.wolfram.com/language/ref/CompiledCodeFunction.html}, note=[Accessed: 26-October-2021 ]}

CMS

Wolfram Language. 2019. "CompiledCodeFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CompiledCodeFunction.html.

APA

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