Wolfram LibraryLink provides a powerful way to connect external code to Mathematica, enabling high-speed and memory-efficient execution.

learn more… | top users | synonyms

16
votes
0answers
282 views

What are these new LibraryLink functions and datatypes for?

Looking at the LibraryLink examples, there are several new functions and objects, as well as example programs, that appeared in version 9. Are these documented? If yes, where? If would be nice to ...
15
votes
0answers
946 views

Using TetGen in Mathematica to get 3D Voronoi diagram

In this post, the use of TetGen for 3D Voronoi tesselation has been briefly discussed. However there is still no info about the use of TetGen to generate a 3D Voronoi diagram. The TetGen documentation ...
8
votes
0answers
95 views

How to prevent the kernel from exiting when a LibraryLink function segfaults?

I do realize that this might be controversial, but I believe I have a real need for it this time. If a process tries to access memory at a location it doesn't own, it will by default exit with a ...
4
votes
0answers
54 views

Is it possible to pass a “shared” integer in librarylink?

MTensor supports shared pass, where the argument can be modified in the library function and that modification can be seen in Mathematica side. Is it possible to do the same thing to a integer or ...
4
votes
0answers
137 views

Compiling/calling Mathematica-generated .so from C

I'm trying to call a compiled function from a C program. I am generating the static object ...
4
votes
0answers
111 views

LibraryLink parallel performance

I'm trying to use a LibraryLink function in parallel. It is an embarrassingly parallel problem, so that no dependency between those parallel tasks. However I can only get the parallel efficiency about ...
4
votes
0answers
129 views

How can I link the c library GAUL into Mathematica?

Is there a way to load the library GAUL (Genetic Algorithm Utility Library) for use within Mathematica?
3
votes
0answers
41 views

weird behaviour of Listable fortran Librarylink function: different result each evaluation

I am working with fotran librarylink function currently. In this post, I will show some weird result of Listable fortran librarylink generated by intel compiler under windows (I tried gcc on linux the ...
3
votes
0answers
53 views

Why is a LibraryLink function, which returns a list, not parallelizing with ParallelTable?

First example: librarylink function return a list of two element ...
3
votes
0answers
71 views

LibraryLink: Asynchronous Examples

Inside the directory structure of LibraryLink there are several example files. Basically, they are divided in two types: Synchronous: demo.c, demo_error.c, ...
3
votes
0answers
160 views

Extracting an equation from an interpolated function

Im trying to use LibraryLink to do some calculations in C but part of the expression i want to calculate is an Interpolating Function. C cant use that obviously so I'm trying to shift it to a data ...
2
votes
0answers
65 views

How does parallelization of LibraryLink function call work?

I'm trying to call a C function in parallel through LibraryLink. Here is an example kind of demonstrates that library function can be used in parallel. My question is what happened in the library ...
2
votes
0answers
131 views

Why am I getting an error from MLPutFunction after getting the MathLink from LibraryLink?

Based on the example on the documentation page for processMathLink, I've got the following C++ code: ...
1
vote
0answers
40 views

Need some help on using LibraryLink

I'm learning to set up a LibraryLink in Mathematica. I'm able to reproduce some basic examples provided in Wolfram community. But I got stuck while doing a new one by myself. My source C file is ...
1
vote
0answers
54 views

How to call python code on an image

I have lots of image processing code written in python and would like to call it from within mathematica. Is there a way to transmit the image data directly like with c++ and LibraryLink? I'd rather ...
1
vote
0answers
90 views

How to load to Mathematica functions linking to MKL with LibraryLink on OSX

I'm trying to load library funcitons to Mathematica which are using MKL functions but I'm constatly getting LibraryFunction::libload on OSX (this works fine on ...
1
vote
0answers
67 views

Getting error LibraryFunction::version from calls to LibraryFunctionLoad

I am having trouble running my program and keep getting this error: LibraryFunction::version: The version number 2 of the library is not consistent with the current or any previous ...
1
vote
0answers
32 views

Is it possible to pass a rank-0 tensor to LibraryLink?

There is such a thing as a rank-0 MTensor. It's mentioned here. Can we pass such an object to a LibraryFunction? How? This question is mostly out of curiosity, and not practical need. But it might ...
1
vote
0answers
34 views

LibraryFunctionLoad not recognizing datatype

I am trying to use LibraryFunctionLoad with a function that relies on a derived type that is defined within the library. I've loaded the library prior to calling ...