2 Replies Latest reply on Feb 16, 2011 1:33 AM by maximmoroz

    Does kernel.setArg affect already enqueued kernel?

    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();