Can I safely use OpenMP with C++11?

后端 未结 5 673
情深已故
情深已故 2020-11-28 22:53

The OpenMP standard only considers C++ 98 (ISO/IEC 14882:1998). This means that there is no standard supporting usage of OpenMP under C++03 or even C++11. Thus, any program

5条回答
  •  一整个雨季
    2020-11-28 23:35

    OpenMP 5.0 now defines the interaction towards C++11. But generally using anything from C++11 and further "may result in unspecified behavior".

    This OpenMP API specification refers to ISO/IEC 14882:2011 as C++11. While future versions of the OpenMP specification are expected to address the following features, currently their use may result in unspecified behavior.

    • Alignment support
    • Standard layout types
    • Allowing move constructs to throw
    • Defining move special member functions
    • Concurrency
    • Data-dependency ordering: atomics and memory model
    • Additions to the standard library
    • Thread-local storage
    • Dynamic initialization and destruction with concurrency
    • C++11 library

提交回复
热议问题