Quantcast
Channel: Intel® C++-Compiler
Viewing all articles
Browse latest Browse all 1665

float to int conversion and autovectorization

$
0
0

I am trying to use Intel C++ Composer XE 2013 to autovectorize a loop.

My loop contains a number of float to int conversions that I need to do in round down (toward negative infinity) mode. My initial implementation used floor() in order to achieve this but this is slow and causes problems for vectorization. If I drop the floor() and use a simple cast then performance improves but presumably I no longer get round down behaviour for negative numbers? Is there a way to do a vectorized int to float conversion in round down mode whilst still relying on autovectorization?


Viewing all articles
Browse latest Browse all 1665

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>