SlideShare a Scribd company logo
std::execution::unseq
https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag
https://wg21.link/P1001R2
C++ 17 에서 추가된 병렬 알고리즘 실행계획
sequenced_policy : 병렬로 동작하지 않고 순차적으로 실행되긴 하는데 우리가 생각하는 순서와 다를 수
있다
parallel_policy : 라이브러리 내부의 스레드에서 병렬로 동작한다. 순차적으로 실행되긴 하는데 우리가
생각하는 순서와 다를 수 있다
parallel_unsequenced_policy : 병렬로 수행되는데 코드의 벡터화가 되어서 수행 될 수 있다 순서가
보장되지 않는다
C++ 20 에서 unseq 추가
단일 스레드에서 실행되지만 코드의 벡터화가 일어남
내가 원한 순서가 보장이 되지 않는다
사용시 주의
메모리 할당 혹은 해제가 아니고 동기화처리가 필요한 경우에는 unseq 는 안전하지
않다
https://m.blog.naver.com/kmc7468/221337487249

More Related Content

PPTX
[C++ 20] [P1035R7] Input range adaptors.
PPTX
[C++ 20] [P0645R10] Text formatting 내용 정리
PPTX
C++20 constexpr default constructor of std::atomic and std::atomic_flag
PDF
[C++ 20][P0325R4] std::to_array() 내용 정리.
PDF
C++ 20 Efficient access to std::basic_stringbuf’s buffer
PDF
C++20 Remove std::weak_equality and std::strong_equality.pdf
PDF
C++ 20 class template argument deduction for alias templates
PDF
C++ 20 Make stateful allocator propagation more consistent for operator+(basi...
[C++ 20] [P1035R7] Input range adaptors.
[C++ 20] [P0645R10] Text formatting 내용 정리
C++20 constexpr default constructor of std::atomic and std::atomic_flag
[C++ 20][P0325R4] std::to_array() 내용 정리.
C++ 20 Efficient access to std::basic_stringbuf’s buffer
C++20 Remove std::weak_equality and std::strong_equality.pdf
C++ 20 class template argument deduction for alias templates
C++ 20 Make stateful allocator propagation more consistent for operator+(basi...

More from 진화 손 (20)

PDF
C++ 20 Unevaluated asm-declaration in constexpr functions
PDF
C++20 Utility functions to implement uses-allocator construction
PDF
C++ 20 std__reference_wrapper for incomplete types
PDF
C++ 20 Stronger Unicode requirements
PDF
C++20 Concepts library
PDF
C++20 Coroutine
PDF
C++ 20 Relaxing the range-for loop customization point finding rules
PDF
C++ 20 Relaxing the structured bindings customization point finding rules
PDF
C++20 explicit(bool)
PDF
C++20 std::map::contains
PDF
C++20 Comparing unordered containers
PDF
C++20 Attributes [[likely]] and [[unlikely]]
PDF
C++ 20 Lambdas in unevaluated contexts
PDF
C++20 Library support for operator<=> <compare>
PDF
C++20 Atomic std::shared_ptr and std::weak_ptr
PDF
C++20 Default member initializers for bit-fields
PDF
C++ 20 constexpr for algorithm and utility
PDF
C++17 init-statements for if and switch
PDF
C++17 Aggregate classes with base classes
PDF
C++17 std::byte
C++ 20 Unevaluated asm-declaration in constexpr functions
C++20 Utility functions to implement uses-allocator construction
C++ 20 std__reference_wrapper for incomplete types
C++ 20 Stronger Unicode requirements
C++20 Concepts library
C++20 Coroutine
C++ 20 Relaxing the range-for loop customization point finding rules
C++ 20 Relaxing the structured bindings customization point finding rules
C++20 explicit(bool)
C++20 std::map::contains
C++20 Comparing unordered containers
C++20 Attributes [[likely]] and [[unlikely]]
C++ 20 Lambdas in unevaluated contexts
C++20 Library support for operator<=> <compare>
C++20 Atomic std::shared_ptr and std::weak_ptr
C++20 Default member initializers for bit-fields
C++ 20 constexpr for algorithm and utility
C++17 init-statements for if and switch
C++17 Aggregate classes with base classes
C++17 std::byte
Ad

C++20 std::execution::unseq.pdf