Profiling a mex-function

后端 未结 3 2384
醉话见心
醉话见心 2021-02-20 13:10

I have just rewritten a Matlab program in c++ as a mex-function to speed things up, with fantastic results. This optimization decision was a very very good idea, with up to a fa

3条回答
  •  [愿得一人]
    2021-02-20 14:04

    the only way i've managed to do this is to separate out the function doing the work and writing a separate wrapper (instead of mexFunction) that loads .mat files with test data and runs as a standalone executable. this can then be profiled using e.g. gprof

提交回复
热议问题