Can i call a same kernel more than a time?

Hi,

I try to call a same kernel more than a time and don’t works, a execution error occurs.

Do have a way to do that?

Thanks,

Luiz Drumond.

I understand what’s happening.

I can’t start the same kernel more than a time when the value of global_work_size is one.
I know that can seem strange, but is necessary for my research.

When i put global_work_size more than one it’s works well.

But, a thing it’s happening and i don’t understand.

The time of execution of sequential code is 4.8 seconds without OpenCL only C ansi code, and the OpenCL code with global_work_size = 2 running in CPU is 0.079 seconds. Something is wrong, anyone knows what is it?

Thanks,
Luiz Drumond.

I can’t start the same kernel more than a time when the value of global_work_size is one.
I know that can seem strange, but is necessary for my research.

The issue is probably somewhere else. Enqueueing the same kernel multiple times should work fine.

The time of execution of sequential code is 4.8 seconds without OpenCL only C ansi code, and the OpenCL code with global_work_size = 2 running in CPU is 0.079 seconds.

How did you measure the time? Are you sure that you are computing the same amount of work in the sequential code and in the OpenCL code?

Hi,

I will create another topic, cause i understand what’s really going on and the informations here are not the correct after some tests that i did.

Thanks,

The informations that i have released.