FunctionCompileExportByteArray

FunctionCompileExportByteArray[fspec]

gives a byte array of binary LLVM code obtained by compiling the function specification fspec.

FunctionCompileExportByteArray[defs,fspec]

uses the auxiliary definitions defs for compilation.

FunctionCompileExportByteArray[fspec,"format"]

gives a byte array of binary code in the specified format.

Details and Options

Examples

open allclose all

Basic Examples  (3)

Generate a compiled version of a function and return the result as a byte array:

Several functions can be compiled with FunctionCompileExportByteArray:

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

Auxiliary definitions can be given with FunctionDeclaration:

Options  (2)

CompilerEnvironment  (1)

Create a compiler environment and add a function definition:

Use a compiler environment in a compilation:

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:

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

Text

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

CMS

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

APA

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

BibTeX

@misc{reference.wolfram_2022_functioncompileexportbytearray, author="Wolfram Research", title="{FunctionCompileExportByteArray}", year="2021", howpublished="\url{https://reference.wolfram.com/language/ref/FunctionCompileExportByteArray.html}", note=[Accessed: 27-November-2022 ]}

BibLaTeX

@online{reference.wolfram_2022_functioncompileexportbytearray, organization={Wolfram Research}, title={FunctionCompileExportByteArray}, year={2021}, url={https://reference.wolfram.com/language/ref/FunctionCompileExportByteArray.html}, note=[Accessed: 27-November-2022 ]}