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

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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.

Inicie sesión para dejar un comentario.