cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Barsik107
Journeyman III

IF in OpenCL kernel

I have vector of 40000 elements, I wan't to calculate it somehow, but I need next condition(IF):

 

uint tid = get_global_id(0);

uint tid1 = get_global_id(1);

 

const uint range=200;

index = tid*range+tid1;

 

if(index>200)

{

output_Tay[index]=index;

}

But this kernel calculate not 39800, but only 7979 elements and I can't understand why? Is there something special about using IF in kernels?

 

 

 

0 Likes
15 Replies