**Hello, I´m trying to code a kernel using opencl. But Im stuck with a stranger error inside of the kernel function. The flow is more or less like this:
__kernel function1() {
struct mytype;
function2(&mytype);
}
function2(struct *mytype) {
uchar *ptr = mytype->value2;
function3(ptr);
}
function3(byte* ptr) {
uint16 v1 = 10;
uint16* ptr2 = (uint16*) ptr;
*ptr2 = v1 >> 8;
}
struct mytype {
uchar value1[8];
uchar value2[8];
uint key[52];
uint bufleft;
}
The code fails when executing the assignment:
*ptr2 = v1 >> 8;
But the only message I receive is "clFlush(): CL_UNKNOWN_ERROR" If I try to assign a value and not an expression, than it works. I´m using OpenCL 1.2 CUDA in Ubuntu