开发者

Openmp usage in C++ object constructors

开发者 https://www.devze.com 2023-01-09 19:10 出处:网络
Can I use op开发者_运维知识库enmp in C++ objects\' constructors? What will be done, when there will be a global static object with such constructor?yes.imagine this to be the same as calling OpenMP f

Can I use op开发者_运维知识库enmp in C++ objects' constructors?

What will be done, when there will be a global static object with such constructor?


yes. imagine this to be the same as calling OpenMP function from constructor.

A second point, I do not know, it may depend on implementation. I am fairly certain the pthreads implementation should be okay for global static objects. http://www.terboven.com/download/poster_A0_portrait_neu_formatiert.pdf

Static initialization maybe somewhat difficult to get right, http://www.parashift.com/c++-faq-lite/ctors.html#faq-10.12. keep in mind that static object are initialized before main.

0

精彩评论

暂无评论...
验证码 换一张
取 消