5 Replies Latest reply on Aug 3, 2011 2:24 PM by nou

    Kernal code for simple searching logic(max value)

    scharupa

      Hi,

       

      Could please help me how to write below c programm in opencl kernal. I tried different scenarios but nothing worked.

      int A[5], temp=0, i;

      //scanning A[5] values from user///

      for(i=0; i>5; i++)

      { if(A>max){

      max=A;}

      }

      printf("%d", max);

       

      Could you please some give me opencl kernal for the same logic