Best practices for mex coding
Ältere Kommentare anzeigen
Hi all,
As I'm starting to include mex code in my code library I find myself unaware of what some best practices may be when developing mex code. For example, how do you organize make scripts? How much interdependency do you allow between given pieces of code given the difficulty in organizing code dependencies. How much difficulty do you encounter in providing cross-system support for mex files? How do you avoid these problems? Within os, how much variability is observed due to other non-os issues such that someone needs to recompile code specifically for their system instead of distributing a singular dll (e.g. .mexw64 file)? How do you handle versioning or distribution of other dynamic or static libraries? How do you like to handle class methods (or significant but related variations in a type of function) given that mex functions are designed around a singular method interface. Do you have any documentation tips you've found useful? Do you shadow your files with m-file implementations?
These questions may be confusing, and I'm sure I am not asking other questions that might be relevant, but the basic question is how to use mex files in a code base without having them be, for lack of a better word, awkward.
Thanks, Jim
4 Kommentare
Jan
am 28 Aug. 2013
These are a good question. Perhaps too good for a short discussion in a forum.
Jim Hokanson
am 2 Sep. 2013
Currently your question got 3 votes and only about 110 questions have more votes. I assume posting the different questions in multiple threads might be a very good idea. E.g. I've struggled a lot with compiling MEX files on one platform with different compilers (Borland, OpenWatcom, LCC, MSVC), so asking for cross-system support of MEX files is a very wide field.
Jim Hokanson
am 10 Sep. 2013
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!