Code covered by the BSD License  

Highlights from
ICC_mex_tools

image thumbnail

ICC_mex_tools

by

 

09 Nov 2012 (Updated )

These tools provide a simple interface to Intel C++ compiler optimization features.

mex_ICC_profileloop(config)
function mex_ICC_profileloop(config)
%mex_ICC_profileloop uses ICC12 with functions+loops 'profiler'
% optimization options are much similir to mex_ICC_O3 (but no openMP),
% however, due to profiler, this mex would be slower.
%
% 1)
% After .mex execution loop_prof_funcs_<timestamp>.dump files would be created 
% IN YOUR CURRENT MATLAB DIRECTORY. (If there is none - try 'clear mex')
% 
% 
% 2)
% To view profiler report, execute 'mex_view_profileloop.m'
% 
% for more information, refer to 
% http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/cpp-win/hh_goto.htm#GUID-96F454BF-364A-40C9-9B55-BFFAA8FD171D.htm


clc
clear mex

c=mex.getCompilerConfigurations;
if ~strcmp(c.Name,'Intel C++')
    warning('this file was supposed to be used with Intel C++ compilers');
end


mex(...
        'OPTIMFLAGS=/O3 /DNDEBUG /QxHost /Qopenmp-report:2 /Qvec-report2 /Qopt-report:0 /Qinline-calloc /Qprofile-loops:all /Qprofile-loops-report:2',...
        config.cpp_file,...
        '-outdir', config.outdir,...
        ...'-g',...              
        '-largeArrayDims',...
        '-v'...
    );
end

Contact us