title: OpenCL: float or integer?
body: <p>Although there are several questions in float type topic I still have some open points to clarify. I use OpenCL 1.1 (NVIDIA).</p>
  
  <p>I want to <strong>compare numbers</strong> and also <strong>use them as an index of an array</strong>: which is faster?
  1.) to use <strong>integers</strong> for both of comparing and indexing
  2.) or to use <strong>floats</strong> and do cast when I use it as an index of an array?</p>
  
  <p>Unfortunately I'm not sure which is more expensive; to cast float to integer or compare integers instead of float.</p>
  
  <p>Is there any advantages of using unsigned integers over signed integers?</p>
  
  <p>EDIT: the main reason I'm asking this that I have an OpenCL code (I mean the host code and the kernel code) and it is not as fast as I expected and my first thought it's because of I'm using uint instead of float.</p>