Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7944 Discussions

vectorization of nested template function

Intel_C_Intel
Employee
244 Views

Hi there,

another quick question concerning the vectorization of nested template functions. I am trying hard to optimize my software, and hence I like to know which loops were vectorized and which were not. While in C the filename and line number of each loop is displayed alongside the results of the vectorization, this is not the case in C++ with template functions. The vectorization report shows the line number where the template was instantiated, not where the actual loop is defined.

For instance, if I call a template function in main as follow

main{

func1(Matrix in, Matrix Out); // line 78

}

and if func1 is defined before that

template

func1 (Matrix in, Matrix out){

// loop 1 // line 25

// loop 2 // line 30

// loop 3 // line 35

}

the vectorization report does display 3 results, one for each loop. But the line numbers do not correspond to where the loops are defined (line 25, 30, 35), but where the template is instantiated (line 78 for all 3 loops). Is there a way to change that so we know exactly which loop was vectorized? For instance, showing both the instantiation AND the definition line would would solve the problem (i.e. the loop defined in25 that was instiated on line 78) would be very helpful.

Thanks in advance

Alexis

0 Kudos
1 Reply
Intel_C_Intel
Employee
243 Views

Has anybody got any idea on how to do that?

Thanks

Alex

0 Kudos
Reply