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 solve this:
What I tried:
It is possible to LibraryFunctionLoad
a function with an argument type of {Integer, 0, "Shared"}
. It is possible to load the function like this. But when trying to pass an integer to it, i.e. simply a = 1
, then fun[a]
instead of a = {1}
then fun[a]
, it gives an error:
LibraryFunction::cfsa: Argument 1 at position 2 should be a machine-size integer.
Comments
Post a Comment