Passing a hypermatrix to a C function

Mike Page Mike at Page-One.Waitrose.com
Thu Mar 11 21:30:52 CET 2010


Hello,

Is it possible to pass a hypermatrix to a C function using the gateway
method?  Looking at stackTypeVariable.h, there does not seem to be a
corresponding datatype (like MATRIX_OF_COMPLEX_DATATYPE).  Also looking at
stack-c.h, there does not seem to be a macro for dereferencing pointers to
hypermatrices (like stk(x)).

I guess I can pass the hypermatrix.dims and hypermatrix.entries elements
separately as MATRIX_OF_INTEGER_DATATYPE and MATRIX_OF_COMPLEX_DATATYPE
respectively, but is there a more efficient way?  Also, for some reason, I
have to convert hypermatrix.dims to double even though it is referenced as
an integer type.  Is this a bug?

Thanks for any advice.
Mike.




More information about the users mailing list