Thanks HRZ,
Instead of opening a new thread i have a doubt.
I have 2 kernels, that have the same command queue, then for kernel1 i enqueue some buffer lets say:
buf1 = enqueueWrite();
buf2 = enqueueWrite();
buf3 = enqueueWrite();
runkernel1(kernel1,buf1...buf3);
then it says on the console:
Reprogramming device [0] with handle 1
For kernel2 i use as argument the buf1 that i enqueued for kernel1 and enqueue new buffer:
buf4 = write();
...
buf7 = write();
runkernel(kernel2, buf1,buf4..buf7);
then it says on the console:
Reprogramming device [0] with handle 33
After multiple calls on kernel 2 (inside a loop on the host), i get this error:
Assertion failed: mem, file acl_mem.c, line 466
What is the possible cause?