MEX files on 64-bits architectures

Since Matlab 7.3, the following types are defined for MEX-files:

On 32-bits machines, these types are simply aliases for int.

On 64-bits machines, it depends on whether one gives the -largeArrayDims for the MEX command:

See Matlab 7.3 release notes for more details.

Since it is mandatory to use the -largeArrayDims when using sparse arrays on 64-bits architectures (and since this option will probably be the default in future versions of Matlab), Dynare's MEX-files are compiled with this option on 64-bits architectures.

This implies that, when coding MEX-files for Dynare, one should not expect that mwSize, mwIndex and int are synonymous.

In particular, appropriate type conversions should be made, especially when pointers are concerned. Such conversions are, for example, used in A_times_B_kronecker_C.

DynareWiki: MexFilesOn64BitsArch (last edited 2009-03-25 17:12:01 by localhost)