Some doubts about library interface

Some doubts about library interface

I already read document many times, but cannot get answer of some questions

1. What's the interface for "copyin" clause. In threadprivate section I found only copyprivate interface (__kmpc_copyprivate).

2. What does want to pass as microtask's (kmpc_micro) arguments. The document said that we must pass "pointers to shared variables accessed by the function." but in exactly what want to pass (e.g. shared variable, reduction variable right? Are there anything else?) 

Thank you

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.

1. What's the interface for "copyin" clause?
There is no special interface for copyin clause. It is implemented as a simple copy plus a barrier.  That is when all worker threads copy the value of the master thread value to their own threadprivate location, the copyin is complete.  The barrier is the simplest way to implement this.

2. Agruments to microtask are pointers to all variables the microtask needs and cannot access directly. These are as you already mentioned shared variables, reduction variables, and also copyin and firstprivate variables. Some special internal variables not visible in the code may also be passed to microtask.


Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya