maximmoroz

Does kernel.setArg affect already enqueued kernel?

Discussion created by maximmoroz on Feb 15, 2011
Latest reply on Feb 16, 2011 by maximmoroz

I am bit lost... Is it Ok to setArg, then enqueue the kernel, then change the arg, and enqueue the kernel again? Will it be executed with different values of argument?

kernel.setArg(0, 1.0); command_queue.enqueueNDRangeKernel(kernel, cl::NDRange(0), cl::NDRange(64), cl::NullRange); kernel.setArg(0, 2.0); command_queue.enqueueNDRangeKernel(kernel, cl::NDRange(0), cl::NDRange(64), cl::NullRange); command_queue.flush();

Outcomes