WOLFRAM

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)Summary of the most common use cases

FunctionCompile creates a CompiledCodeFunction:

Out[1]=1

The CompiledCodeFunction evaluates with an argument of the correct type:

Out[2]=2

Information returns information about a CompiledCodeFunction:

Out[3]=3

Extract just the type signature for the function:

Out[4]=4

Scope  (3)Survey of the scope of standard use cases

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:

Out[2]=2

The restored CompiledCodeFunction works as expected:

Out[3]=3

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:

Out[1]=1

A shared library can be embedded in the output:

Out[1]=1

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

Out[2]=2

The restored CompiledCodeFunction works as expected:

Out[3]=3
Wolfram Research (2019), CompiledCodeFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/CompiledCodeFunction.html.
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.

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

CMS

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

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

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

BibTeX

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

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

BibLaTeX

@online{reference.wolfram_2025_compiledcodefunction, organization={Wolfram Research}, title={CompiledCodeFunction}, year={2019}, url={https://reference.wolfram.com/language/ref/CompiledCodeFunction.html}, note=[Accessed: 11-May-2025 ]}

@online{reference.wolfram_2025_compiledcodefunction, organization={Wolfram Research}, title={CompiledCodeFunction}, year={2019}, url={https://reference.wolfram.com/language/ref/CompiledCodeFunction.html}, note=[Accessed: 11-May-2025 ]}