Main Content

MATLABSupport 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 functions usedintin C/C++ andINTEGER*4in 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 theC Matrix APIsupport 64-bit indexing:

  • New types -mwSizeandmwIndex- enabling large-sized data.

  • Updated C Matrix API functions usemwSizeandmwIndextypes for inputs and outputs. These functions are called the64-bit APIor the large-array-handling API.

To help transition your MEX files to the 64-bit API, MATLAB maintains an interface, orcompatibility layer. To build MEX files with this interface, use the-compatibleArrayDimsflag.

Note

Only variables representing array size or index value require themwSizeormwIndextypes. The C-languageintdata type is valid for variables representing, for example, the number of fields or arrays.

See Also

|

Related Examples

More About