MATLAB Support for 64-Bit Indexing
MATLAB® Version 7.3 (R2006b) added support for 64-bit indexing. With 64-bit
indexing, you can create variables with up to 248-1 elements
on 64-bit platforms. Before Version 7.3, the C/C++ and Fortran API Reference library
int in C/C++ and
Fortran to represent array dimensions. These types limit the size of an array to 32-bit
integers. Simply building and running MEX files on a 64-bit platform does not guarantee
you access to the additional address space. You must update your MEX source code to take
advantage of this functionality.
The following changes to the C Matrix API support 64-bit indexing:
To help transition your MEX files to the 64-bit API, MATLAB maintains an interface, or compatibility layer. To
build MEX files with this interface, use the
Only variables representing array size or index value require the
mwIndex types. The
int data type is valid for variables representing, for
example, the number of fields or arrays.