MATLAB Compiler Release Notes    

Chapter 2
MATLAB Compiler 2.1 Release Notes


New Features

This section introduces the new features added in the MATLAB Compiler 2.1 since the MATLAB Compiler 2.0.1 (Release 11.0).

Optimizations

The MATLAB Compiler 2.1 supports several types of optimizations. The format of the optimization option is

There are three possibilities.

The first form

turns the optimization class on or off. This table describes the possibilities.

Optimization Class
Description
fold_scalar_mxarrays
Fold scalar valued array constants
fold_non_scalar_mxarrays
Fold nonscalar valued array constants
optimize_integer_for_loops
Optimize for-loops with integer starts and increments
optimize_conditionals
Optimize conditional expressions when both operands are integers
array_indexing
Optimize simple one- and two-dimensional array index expressions

The second form of the optimization option

lists the available optimization classes.

The third form

uses a bundle file called opt_bundle_<level> to determine which optimizations are on or off. For example,

looks for a bundle file called opt_bundle_all and uses the options in the bundle file. Bundles for -O all and -O none are provided by default.

Dynamically Linking in MEX-Files in the Stand-Alone Environment

The MATLAB Compiler 2.1 supports dynamically linking in MEX-files in the stand-alone environment. Specifying -h automatically compiles in any referenced MEX-files. Specifying MEX-files on the command line is supported and will work the same way as compiling an M-file.

The only restriction is that you cannot run a Compiler-generated MEX-file from stand-alone code. This restriction is minimal because you can include the M-file source directly, which is preferred by the Compiler.

MATLAB Add-In for Visual Studio®

The MATLAB add-in for the Visual Studio development environment integrates the MATLAB Compiler 2.1 into Visual C/C++ 5 or 6. Running mbuild -setup or mex -setup automatically adds the Project Wizard into Microsoft Visual Studio so that you can use the Visual Studio environment to compile and run M-files. See the MATLAB Compiler User's Guide for more information on configuration.

mlib Files

The introduction of mlib files makes it possible to produce a shared library out of a toolbox and then compile M-files that make calls into that toolbox.

When compiling a collection of files (from a toolbox, for example) into a library, the Compiler creates a separate file with the M interface descriptions of the various M-functions that are available in the library. You can then use this file to compile other functions that make calls into the M-files in the library without recompiling the M-files. The extension of these library description files is .mlib.

Prior to this release, the Compiler would pass any file that it did not recognize on the command line as an M-file to mbuild. In this release, the Compiler uses files with the .mlib extension to allow compilation against a library of compiled M-files. See the MATLAB Compiler User's Guide for more information.

Additional Datatype Support

Integer Data Types.   The MATLAB Compiler 2.1 supports the integer datatypes.

int8
uint8
int16
uint16
int32
uint32

Function Handles.   A function handle is a new MATLAB data type that captures all the information about a function that MATLAB needs to execute, or evaluate, it. The MATLAB Compiler 2.1 supports function handles. For more information on function handles, see the function_handle reference page.

Improved Support for load and save

The load and save commands are supported when they do not list the variables to be loaded or saved.

Faster C/C++ Math Library Applications

The performance of the C/C++ Math Library has been improved considerably. Scalar accelerated versions of many library functions have been added, and improvements have been made to the overall performance of all library applications.

Printing from the C/C++ Graphics Library

The MATLAB C/C++ Graphics Library now supports printing.

Additional Language Support

pause and continue.   The MATLAB Compiler 2.1 supports the MATLAB commands pause and continue.

eval and input.   eval and input are supported for strings that do not contain workspace variables.


  Upgrading from an Earlier Release Third Party Compilers