开发者

Openmp usage in C++ object constructors

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜