main content

clear results logged by instrumented, compiled c code function -凯发k8网页登录

clear results logged by instrumented, compiled c code function

description

clearinstrumentationresults('mex_fcn') clears the results logged from calling the instrumented mex function, mex_fcn.

example

clearinstrumentationresults mex_fcn is an alternative syntax for clearing the log.

clearinstrumentationresults all clears the results from all instrumented mex functions.

examples

this example shows how to create an instrumented mex function, run a test bench, then view logged results.

define prototype input arguments.

n = 128;
x = complex(zeros(n,1));
w = fi_radix2twiddles(n);

generate an instrumented mex function. use the -o option to specify the mex function name. use the -histogram option to compute histograms.

if you have a matlab® coder™ license, you can also add the -coder option. in this case,

buildinstrumentedmex testfft -o testfft_instrumented -args {x,coder.constant(w)} -histogram

if you have a matlab® coder™ license, you can also add the -coder option. for example,

buildinstrumentedmex testfft -coder -o testfft_instrumented -args {x,w}

like the fiaccel function, the buildinstrumentedmex function generates a mex function. to generate c code, use the matlab® coder™ codegen function.

run a test file to record instrumentation results. use the showinstrumentedmex function to open the report. to view the simulation minimum and maximum values and whole number status, pause over a variable in the report. you can also see proposed data types for double precision numbers in the table.

for i=1:20
   y = testfft_instrumented(randn(size(x)),w);
end
showinstrumentationresults testfft_instrumented

instrumentation-report-tb1.png

close the histogram display, then use the clearinstrumentationresults function to clear the results log.

clearinstrumentationresults testfft_instrumented

run a different test bench, then view the new instrumentation results.

for i=1:20
   y = testfft_instrumented(cast(rand(size(x))-0.5,'like',x),w);
end
showinstrumentationresults testfft_instrumented

instrumentation-report-tb2.png

to view the histogram for a variable, click the histogram icon in the variables tab.

numeric-type-scope-x-tb2.png

close the histogram display, then use the clearinstrumentationresults function to clear the results log.

clearinstrumentationresults testfft_instrumented

clear the mex function.

clear testfft_instrumented

input arguments

instrumented mex function created using buildinstrumentedmex.

version history

introduced in r2011b

网站地图