AnsweredAssumed Answered

Unexpected results in kernel

Question asked by Kay on Feb 11, 2012
Latest reply on Feb 16, 2012 by Kay

1, the loop


int len = 32;

while(len > 0) {




This loop is supposed to exit in the third time, however, it never ends.

In the second time, len becomes 0 after len-=16.

however when it gets to (len>0), len becomes a very large number.

why this will happen?




void new(__global uchar * output  ,

              __global uchar * input  ,

                __constant uint * offset) {


     __global uchar *out = offset[idx] + output;



the value of pointer output and input are all 0, is this right?

the value of variable "out" is not right, what is the right way to process different parts of a string?


The testbed is win7 + vs2010



Source code is attached. The first question is in the line 826 in and the second question is in the line 816