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;
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?