scharupa

Kernal code for simple searching logic(max value)

Discussion created by scharupa on Aug 3, 2011
Latest reply on Aug 3, 2011 by nou

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

Outcomes