Hello Everyone. I'm trying to generate gray code with some useful features on GPU. During debugging kernel in CodeXL found some unexplainable jumps in code, after check "if" statement it is jump to the "middle of nowhere". In my case, it jumps from 240 line (!tempB is true) in kernel to line 259, of course newState is not initialized etc. Exactly the same code on cpu c++ runs just fine, entering into {}. win7 x64, hd6850, 12.10 catalyst, 2.8 app sdk, msvs2010, last codexl. The same error on 13.1 catalyst. The same with -cl-opt-disable.
P.S. For runnning in main.cpp change platformList[1] <- for your number,
"E:\\OpenclKernels\\kernel.cl" for your path to kernel.
Screenshots:
F10.... and
I have decided problem by commenting "for" cycle and new inline copy arr function.But imho, it's obvious bug, check and correct it please.
Compiler is ok, adding "#pragma pack (push, 16)" etc in outer code seems like settle down the problem at all, seemingly stack was corrupted or something like this.
Message was edited by: agat50