Binary MEX-files built on 64-bit platforms can handle 64-bit
These large data arrays can have up to 248–1
elements. The maximum number of elements a sparse
have is 248-2.
Using the following instructions creates platform-independent binary MEX-files as well.
Your system configuration can affect the performance of MATLAB®.
The 64-bit processor requirement enables you to create the
access data in it. However, the system memory, in particular the size
of RAM and virtual memory, determine the speed at which MATLAB processes
mxArray. The more memory available, the faster
The amount of RAM also limits the amount of data you can process at one time in MATLAB. For guidance on memory issues, see Strategies for Efficient Use of Memory. Memory management within source MEX-files can have special considerations, as described in Memory Management.
The signatures of the API functions shown in the following table
to work with a 64-bit
mxArray. The variables you
use in your source code to call these functions must be the correct
mxArray Functions Using mwSize/mwIndex
1Fortran function only.
2C function only.
mex build script
-largeArrayDims with the 64-bit API.
When using the 64-bit API,
INTEGER*8 in Fortran. This type is
INTEGER*4, which is the type used
in the 32-bit API. Be careful not to pass any negative values to functions
Do not cast negative
INTEGER*4 values to
the returned value cannot be predicted. Instead, change your code
to avoid using negative values.
If you develop cross-platform applications (programs that can
run on both 32- and 64-bit architectures), pay attention to the upper
limit of values you use for
The 32-bit application reads these values and assigns them to variables
INTEGER*4 in Fortran. Be careful to
avoid assigning a large
INTEGER*4 or other variable that might be