There isn't one. You've got a couple options that I know of. First, you could write pull the NVs out of your AVs and put them into a new double [][] that you New() and Safefree() on the spot. That will use lots of memory if your array is big. Alternately you could have your Perl code keep your data in packed C arrays to begin with, using something like Tie::CArray. Then you can write a little XS to put out the double** from that and pass it to your C code.
-sam
| [reply] |
Hello Sam,
thank for your email.
SO my conclusion is that it is going to be efficient to call a c routine with a AoA, I imagined that the machine representation was close between a AoA and a double [][]!
It looks like that I am wrong.
Will it it be a lot more efficient to pass several double [] ?
Regards.
Patrick Dupre
The University of York
| [reply] |
| [reply] |
Yup, AVs and C arrays are very different beasts. If the volume of data is the same I don't think you'll see a big difference between a double[][] and several double[]s but only you know the details well enough to judge.
-sam
| [reply] |