MATLAB COMPILER RELEASE NOTES Guida Utente Pagina 213

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
Vedere la pagina 212
mcc
7-35
would be equivalent to
mcc -m -I /home/user/dir1 -I /home/user/dir2 myfile.m
The Compiler finds the myfile.m in dir1 and compiles it instead of the one in
dir2 because of the behavior of the -I option. If you are concerned that this
might be happening, you can specify the
-v optionandthenseewhichM-file
the Compiler parses. The
-v option prints the full pathname to the M-file.
Note The Compiler produces a warning (specified_file_mismatch)ifafile
with a full pathname is included on the command line and it finds it
somewhere else.
Compiling Embedded M-Files
If the M-file you are compiling calls other M-files, you can list the called M-files
on the command line. Doing so causes the MATLAB Compiler to build all the
M-files into a single MEX-file, which usually executes faster than separate
MEX-files. Note, however, that the single MEX-file has only one entry point
regardless of the number of input M-files. The entry point is the first M-file on
the command line. For example, suppose that
bell.m calls watson.m.
Compiling with
mcc -x bell watson
creates bell.mex. The entry point of bell.mex is the compiled code from
bell.m. The compiled version of bell.m can call the compiled version of
watson.m. However, compiling as
mcc -x watson bell
creates watson.mex. The entry point of watson.mex is the compiled code from
watson.m.Thecodefrombell.m never gets executed.
As another example, suppose that
x.m calls y.m and that y.m calls z.m.Inthis
case, make sure that
x.m is the first M-file on t he command line. After x.m,it
does not matter which order you specify
y.m and z.m.
Vedere la pagina 212
1 2 ... 208 209 210 211 212 213 214 215 216 217 218 ... 263 264

Commenti su questo manuale

Nessun commento