octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mex API changes for 64bit


From: David Bateman
Subject: Re: Mex API changes for 64bit
Date: Sun, 03 Jun 2007 18:59:09 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Christopher Hulbert wrote:
> 
> Before matlab added mwSize, the API used integers. Some people (myself
> included) have not had the chance to go back and change my code. And
> if I did, I would need to test if the matlab header had mwSize
> defined, and handle the case when it does not. That's the reason I
> brought it up.
>

Hi Chris,

But if the underlying code uses long's then you'll have problems in any
case. The only functions I see that will really cause issues are the
mxSetIr, mxSetJc, mxGetIr and mxGetJc functions as these are really the
only ones that return arrays of type mwSize/mwIndex. For scalars long's
they will be converted to int's on the assignment and so if the matrices
you use are smaller than 2GB there should be no issue. So if you don't
use sparse matrices in your mex files, keeping the int's at least for a
while shouldn't be an issue.

However, if you do use sparse matrices, and use a 64bit system then it
would be interesting to know what the effect would be. Did mathworks
implement conversion functions for mxSetIr, etc? If they didn't, as I
suspect, then unless you are in the native precision of the Octave
build, then your mex build will fail whatever flags you use.

Anyone out there have a 64bit with matlab R2006b or later installed want
to try a smaller test program and see what it gives for the above case?

D.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]