How are firstprivate and lastprivate different than private clauses in OpenMP?

前端 未结 2 913
不知归路
不知归路 2020-11-28 03:44

I\'ve looked at the official definitions, but I\'m still quite confused.

firstprivate: Specifies that each thread should have its own in

2条回答
  •  孤独总比滥情好
    2020-11-28 03:57

    firstprivate and lastprivate are just special cases of private.

    The first one results in bringing in values from the outside context into the parallel region while the second one transfers values from the parallel region to the outside context.

提交回复
热议问题