PDA

View Full Version : clflush or clfinish



jai
01-22-2013, 07:11 AM
when to use clfinish or clflush or nothing, if i have single command_queue .
thanks

clint3112
01-23-2013, 01:08 AM
To keep the answer as short as your question:
Read the spec!

If you just want to be shure that all work is finished at the end of the day, you could enqueue the last read blocking. If you have an ordered queue, this will be enought. If you have kernel b and c, both waiting for a result of a, there could be problems. In that cases, flush will do what you want.

I'm not really shure but i think finish is only needed when you want to change things on your context / queue