Skip to main content

New answers tagged

1 vote

ForeignFunctionLoad / RawMemoryAllocate and c-struct that includes an array

foo(int v, struct * myStruct); typedef struct { double a; double b[2][2]; } myStruct; You mixing two things here. one is a typedeffed struct and one is a ...
Erik's user avatar
  • 11
9 votes
Accepted

ForeignFunctionLoad / RawMemoryAllocate and c-struct that includes an array

Assume we have the following function (just add 1 to each element): ...
Ben Izd's user avatar
  • 9,474
11 votes

ForeignFunctionLoad / RawMemoryAllocate and c-struct that includes an array

Here is an example of the wrapper that I mentioned. I compiled it with Apple Clang, and it seems to work. But I don't give any guarantees that it will work properly with all compilers. Btw. ...
Henrik Schumacher's user avatar
3 votes

Calling Sage functions from Mathematica

You have two options: the easy one, but it might be slow, and the expert one, but it might crash the app. So: easy: Use the RunThrough function, which lets you call any executable (so in your case, a ...
Mike 'Pomax' Kamermans's user avatar

Top 50 recent answers are included