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_PGOgen(config)
function mex_ICC_PGOgen(config)
%MEX_ICC_DEBUG uses ICC with general Profile Guided Optimization - generate option
%
% Each .mex execution would generate .dyn file in config.outdir folder. 
% These files could be used during mex_ICC_PGOuse compilation for PGO
% optimizations.
%
% !!! *.dyn file would appear in config.outdir after you execute our mex
%     and then unload it with "clear mex"
%
% for more detail refer to
% http://software.intel.com/sites/products/documentation/doclib/stdxe/2013/composerxe/compiler/cpp-win/hh_goto.htm#GUID-42C5C93F-5F77-4B14-8A27-95798BC30CE3.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= /O2 /DNDEBUG /QxHost /Qopenmp-report:2 /Qvec-report2 /Qopt-report:0 /Qinline-calloc /Qprof-dir:%OUTDIR% /Qprof-gen:globdata',...
        config.cpp_file,...
        '-outdir', config.outdir,...
        ...'-g',...        
        '-largeArrayDims',...
        '-v'...
    );
end

Contact us