Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I don't know if you will really find speed improvement anecdotes that helpful, as your results are going to be highly dependent on your own implementation.</p> <p>That said, the following reference on <a href="http://www.mathworks.com/help/simulink/ug/how-the-acceleration-modes-work.html" rel="nofollow">How Acceleration Modes Work</a> might be useful to you.</p> <p>As described in this link...</p> <blockquote> <p>The Accelerator mode generates and links code into a C-MEX S-function. Simulink uses this acceleration target code to perform the simulation...</p> <p>...the model methods are separate from the Simulink software and are part of the Acceleration target code. A C-MEX S-function API communicates with the Simulink software, and a MEX API communicates with MATLAB. The target code executes in the same process as MATLAB and Simulink.</p> </blockquote> <p>The link goes on to describe Rapid Acceleration, as such:</p> <blockquote> <p>The Rapid Accelerator mode creates a Rapid Accelerator standalone executable from your model. This executable includes the solver and model methods, but it resides outside of MATLAB and Simulink. It uses External mode (see Host/Target Communication) to communicate with Simulink.</p> </blockquote> <p>(Note that the actual link has some nice diagrams that help to illustrate this architecture).</p> <p>I think that there are a few important things to takeaway from these descriptions. First, in Accelerator Mode, code is only generated for the model methods; however, in Rapid Accelerator Mode, code is also generated for the solver. In either case there will be some overhead due to communication between the generated code and Simulink (though in general that overhead would be greater in non-rapid accelerator mode).</p> <p>Now, whether you are going to see significant differences between these acceleration modes and full-on code generation will most likely depend on how you would be using the generated code. You had stated that your application is intended to essentially analyze/visualize the outputs of simulink models. Do you intend for you application, itself, to be a Simulink model? If so, I imagine your workflow would be that you generate code for the "plug-in" model and then incorporate this into your "parent" model as an s-function. Based on the descriptions given above, my gut feeling is that you would not see much of a performance improvement compared to accelerator mode.</p> <p>However, if your application is to be implemented outside of Simulink, then code generation would definitely be the way to go. In this case, you've completely eliminated the overhead of communicating with Simulink. In this workflow, you could, for example, generate a stand-alone executable from the "plug-in" model, execute that model to get the outputs, and then simply load those outputs for analysis and visualization into your application. Your application could be written in any language you want. In fact, you could even still write your application in MATLAB -- the key point, though, being that your application runs once the stand-alone executable (generated from the "plug-in" model) has <em>finished</em> executing, rather than interfacing with the plug-in model <em>while</em> it is executing.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload