Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sun_c_
Beginner
86 Views

Is icc 2017 could change no simd code to simd code automatic

Jump to solution

My company bought parallel studio xe 2017 composer edition for cpp last month. I build image process module with new icc. we last use icc bought in 2011. As the same using i3 cpu, I find  CPU occupancy is lower than before.  With new icc, the cpu occupancy of cpu1 could reduce 24%, cpu2 could reduce about 15%,cpu0 and cpu3 without any change. We only use cpu1 and cpu2 for image processing.

Is new icc could change no simd code to sse2 or avx to optimize the image processing speed?

Thanks.

0 Kudos
1 Solution
SergeyKostrov
Valued Contributor II
86 Views
>>Is new icc could change no simd code to sse2 or avx to optimize the image processing speed? It depends on what CPU used to build an executable. If /QxHost command line option is used then the highest ISA will be selected. Also, take into account that if /fast is used then it enables /QxHOST /O3 /Qipo /Qprec-div- options.

View solution in original post

3 Replies
SergeyKostrov
Valued Contributor II
87 Views
>>Is new icc could change no simd code to sse2 or avx to optimize the image processing speed? It depends on what CPU used to build an executable. If /QxHost command line option is used then the highest ISA will be selected. Also, take into account that if /fast is used then it enables /QxHOST /O3 /Qipo /Qprec-div- options.

View solution in original post

sun_c_
Beginner
86 Views

Thanks,I will read Intel® C++ Compiler 17.0 Developer Guide and Reference for more info.

Another question, If I use Intel® C++ Compiler 17.0,  when highest ISA is selected, don't I  need to write SIMD c++ code or assembly code to speed  image processing?

Thanks.

 

jimdempseyatthecove
Black Belt
86 Views

The modern C++ compilers are capable of converting "traditional" array[] indexed code into using SIMD instructions provided the access patterns are amicable to vectorization.

for(int i=0; i<N; ++i)
   Diff = imageA - imageB;

The above is easily vectorizable by the compiler. There are many cases where it is not (non-unit strides, referencing array elements produced by prior iteration are a few). The compiler has options to produce reports on vectorization and/or lack thereof. Try these options with your existing code. You may be surprised.

Jim Dempsey

Reply