next up previous contents
Next: User-modifiable parts Up: Interfacing CUTEr and Matlab Previous: Using CUTEr from within   Contents

Adding a new tool

Should the user add new C or Fortran tools to CUTEr that are to be interfaced with Matlab, utools.f and/or ctools.f should be updated accordingly and the corresponding .m file should be created and stored in the directory $CUTER/common/src/matlab/. For information on MEX-File debugging, refer to your local MATLAB documentation.

The user should also pay attention to their local implementation of pointers. If the mxCopy__ construct is used, pointers should be declared as integer*8 on DEC Alpha and 64-bit SGI machines and as integer*4 on all other platforms. If the local Fortran compiler supports this option, a clear multi-platform code may be obtained by having the C preprocessor map the pointers to the correct declarations at the preprocessing stage.

Note finally that after compilation and linking, the name of the resulting MEX-File will have an extension that depends on the platform on which compilation was performed. For example, this extension is mexsol on Sun machines running Solaris, and mexsg64 on 64-bit SGI machines.



Dominique Orban 2005-03-24