Some doubts about library interface

Some doubts about library interface

Bild des Benutzers Pisit M.

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

2 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.
Bild des Benutzers Andrey Churbanov (Intel)

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.

Regards,
Andrey 

Melden Sie sich an, um einen Kommentar zu hinterlassen.