0 Replies Latest reply on Sep 22, 2008 1:29 PM by MELO_AX

    How work the kernel??

    MELO_AX

       

       

       

       

       

       

       

       

       

       

       

       

      kernel

      void check_eps(float a[][], float eps, float size, out float result<>{

       



       

      float2 index = float2 (0.0f, 0.0f);

       

       

      float2 step = float2 (0.0f, 1.0f);

       

       

      float2 index2 = index+step;

       

       

      float i = 1.0f;

       

       

      float accumulator = 0.0f;

       

       

       

       

      while (i<size){

       

       

      if ((a[index.xy] - a[index2.xy]) <= eps){ accumulator = accumulator + 1.0f;}

       

      else{accumulator = accumulator + 0.0f;}

      i = i+1; index = index2; index2 = index2 + step;

      }

      result = accumulator;

      }

      Sometimes result is 1 but the differenz of each elements of the rows is not smaler than eps!!!! Why!!?!?!