简体   繁体   中英

OpenMP for C++ class variables

在c ++中,当我们使用OpenMP指令并行化循环时,如果我们在循环中使用该类的实例,并希望让该类的某些成员在所有线程之间都是私有的,而在其他线程之间要共享它们,该怎么办?

non-static class members cannot be individually chosen to be private or shared. You can only make the whole class object shared or private.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM