CompiledComponentRawInterface
CompiledComponentRawInterface[comp]
represents the raw interface of a compiled component.
Details
- CompiledComponentRawInterface[comp] can be used to add raw library function declarations to a compilation command such as FunctionCompile.
- CompiledComponentRawInterface[comp] can be used to add raw library function declarations to a compiler environment with CreateCompilerEnvironment and with CompilerEnvironmentAppendTo.
- The raw library function declarations provided by CompiledComponentRawInterface are given by "RawLibraryFunctions" entries in DeclareCompiledComponent. These are given as a rule "name"Typed[funcName,ty]. This specifies that a compiled version of funcName with type ty will be exported by the library built for the component.
- Compilations that use declarations provided by CompiledComponentRawInterface refer directly to funcName in the "RawLibraryFunctions" setting.
Examples
Basic Examples (1)
CompiledComponentRawInterface is useful because it allows declarations from a compiled component to be used from a library without having to compile them.
DeclareCompiledComponent can create a raw library function to be used by other compiled code:
Load and initialize the component library:
A declaration of the function in the library:
Compile a function that uses the library:
Run the computation that calls the library:
Instead of using the LibraryFunctionDeclaration, the component library interface can be used directly:
Text
Wolfram Research (2024), CompiledComponentRawInterface, Wolfram Language function, https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html.
CMS
Wolfram Language. 2024. "CompiledComponentRawInterface." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html.
APA
Wolfram Language. (2024). CompiledComponentRawInterface. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CompiledComponentRawInterface.html