OpenMP-like flush operation in Cilk+?

OpenMP-like flush operation in Cilk+?

Dear everyone, 

Does in Cilk+ exist such operation that invalidates the corresponding cache line so as to force the retrieval from the main memory just like what does OpenMP "flush"? 

Thanks!

Bests,

Fan

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Grrk.  That's NOT what OpenMP flush does, I am afraid!  The specification is massively unclear about exactly what it does, but it's general effect is to synchronise the local view of data with the global view of data.  But, if another thread has made a change and not yet used flush, you are very likely to not see that change.  I think that you need to be a lot more precise about what you need and why.

As a general rule, the more synchronisation you use, the slower your program will run and the less you are likely to be 'thinking in parallel'.  Some requirements fundamentally require synchronisation, of course, but it should be avoided unless essential.

Login to leave a comment.