Message Boards Message Boards

GROUPS:

List of LibraryLink examples

Posted 6 years ago
5505 Views
|
4 Replies
|
7 Total Likes
|
This is a list of a fully functional LibraryLink examples, starting with the bare minimum to more complicated cases:
  1. Doing nothing with LibraryLink -- Explains how to write a minimal example in LibraryLink that takes no arguments and returns nothing
  2. Saying hello with LibraryLink -- Explains how to return a value from a LibraryLink function
  3. Sending greetings from LibraryLink -- Explains how to pass in a value to a LibraryLink function
  4. Squaring integers with LibraryLink -- Explains how to write a basic arithmetic function with LibraryLink
  5. Writing a boolean function with LibraryLink -- Explains how to write a function that returns True or False
  6. Calculating the mean value of a list with LibraryLink -- Explains how to pass lists for a LibraryLink function
  7. Creating a matrix with LibraryLink -- Explains how to return a matrix from a LibraryLink function
  8. Working with complex numbers in LibraryLink 
  9. Working with multiple functions in LibraryLink 
LibraryLink examples which use WolframLink:
  1. Hello World revisited using WolframLink in LibraryLink
  2. Working with a variable number of arguments in LibraryLink
4 Replies

Hello Arnoud,

thanks for these very helpful examples. Unfortunately, there is a case missing:

I would like to pass several MTensors as a result via LibraryLink.

Say, I have a real matrix and a list of integers that I want to pass on.

Thanks, Michael

Not sure how to do this off-hand, but I will ask some people who might know.

Another good place to look for a possible answer is the Q&A site called StackExchange:

https://mathematica.stackexchange.com/search?q=LibraryLink

Code is also available in this GitHub repository:

https://github.com/arnoudbuzing/wolfram-librarylink-examples

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract