ConnectLibraryCallbackFunction[mname,cf]
connects a CompiledFunction cf with the library callback manager with name mname.
ConnectLibraryCallbackFunction
ConnectLibraryCallbackFunction[mname,cf]
connects a CompiledFunction cf with the library callback manager with name mname.
Details
- A unique positive integer ID is generated, and the function associated with the manager with name mname is called with that ID.
- ConnectLibraryCallbackFunction[mname,cf] returns True if the manager function returns the mbool value True (=1).
- A manager is registered by using the LibraryLink callback function registerLibraryCallbackManager.
- A connected function can be called using the LibraryLink callback function callLibraryCallbackFunction.
Examples
Basic Examples (1)
Load an example LibraryFunction that applies a callback function to each element in a list:
applyCallback = LibraryFunctionLoad["demo_callback", "apply_callback", {{Real, _}}, {Real, _}];Compile a simple function and connect the CompiledFunction to the library callback manager:
cf = Compile[{{x, _Real}}, Nest[3.75#(1. - #)&, x, 10]]ConnectLibraryCallbackFunction["demo_callback_manager", cf]Applying the LibraryFunction to a list will use the CompiledFunction for each element:
ListPlot[applyCallback[N[Range[0, 100]] / 100], DataRange -> {0, 1}]See Also
Tech Notes
Related Guides
History
Text
Wolfram Research (2014), ConnectLibraryCallbackFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/ConnectLibraryCallbackFunction.html.
CMS
Wolfram Language. 2014. "ConnectLibraryCallbackFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ConnectLibraryCallbackFunction.html.
APA
Wolfram Language. (2014). ConnectLibraryCallbackFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ConnectLibraryCallbackFunction.html
BibTeX
@misc{reference.wolfram_2026_connectlibrarycallbackfunction, author="Wolfram Research", title="{ConnectLibraryCallbackFunction}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ConnectLibraryCallbackFunction.html}", note=[Accessed: 15-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_connectlibrarycallbackfunction, organization={Wolfram Research}, title={ConnectLibraryCallbackFunction}, year={2014}, url={https://reference.wolfram.com/language/ref/ConnectLibraryCallbackFunction.html}, note=[Accessed: 15-June-2026]}