clflush or clfinish

when to use clfinish or clflush or nothing, if i have single command_queue .
thanks

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