What you see is a legacy structure of MATLAB classes (they since have moved to a newer implementation, see here), which are organized as a folder/file structure where indicates that this is a class. m methods are directed to a MEX file called ctmethods which interfaces with the C++ libraries. m objects then call methods in the private directory of each class. m functions are often single-line scripts that call. m functions that the user directly interact with. I am responding to the first two questions here the other questions are better served in separate threads here. (Which is, however, consistent with what is used in the current MATLAB implementation). I also apologize that some of my working knowledge dates back to MEX files as they stood in the early 2000's. thank you for starting the discussion! I am not using the MATLAB interface much, but will try to answer. Is there some part of cantera that could benefit from parallelization but could not be easily vectorized in C++? If so then I think at least these could benefit from having a native MEX code for MATLAB to call directly.īeta Was this translation helpful? Give. On the other hand MATLAB is extremely slow with sequential operations (like FOR loops). But one major advantage of coding in MEX is that it could use MATLAB's powerful vectorization capability to drastically speed up vector and matrix operations (I'm seeing at least 10x and potentially more with GPU). Is there a self-contained module of cantera that I could use to test direct C++ integration? Currently I'm working with a very small experimental library I wrote myself (only two header files) which doesn't give me a good idea of the complexity and scale of integrating a large library.Īnother way is to re-write each C++ function into MEX which obviously we are not going to do. What makes the ctmethods MEX file difficult to maintain? I would like to know if I understand the current implementation correctly:.I will be posting questions regarding implementing a new MATLAB interface based on direct C++ library integration introduced in MATLAB 2019a.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |