/usr/include/c++/11/pstl
NameSizeModeActions
algorithm_fwd.h683400644editdlrm
algorithm_impl.h1745040644editdlrm
execution_defs.h36940644editdlrm
execution_impl.h48320644editdlrm
glue_algorithm_defs.h322780644editdlrm
glue_algorithm_impl.h643520644editdlrm
glue_execution_defs.h15490644editdlrm
glue_memory_defs.h38650644editdlrm
glue_memory_impl.h194120644editdlrm
glue_numeric_defs.h66200644editdlrm
glue_numeric_impl.h123020644editdlrm
memory_impl.h40450644editdlrm
numeric_fwd.h79290644editdlrm
numeric_impl.h186940644editdlrm
parallel_backend.h8450644editdlrm
parallel_backend_serial.h40000644editdlrm
parallel_backend_tbb.h437650644editdlrm
parallel_backend_utils.h91110644editdlrm
parallel_impl.h41100644editdlrm
pstl_config.h73320644editdlrm
unseq_backend_simd.h291820644editdlrm
utils.h46060644editdlrm
Edit: /usr/include/c++/11/pstl/memory_impl.h (4045B)
// -*- C++ -*- //===-- memory_impl.h -----------------------------------------------------===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// #ifndef _PSTL_MEMORY_IMPL_H #define _PSTL_MEMORY_IMPL_H #include #include "unseq_backend_simd.h" namespace __pstl { namespace __internal { //------------------------------------------------------------------------ // uninitialized_move //------------------------------------------------------------------------ template _OutputIterator __brick_uninitialized_move(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, /*vector=*/std::false_type) noexcept { using _ValueType = typename std::iterator_traits<_OutputIterator>::value_type; for (; __first != __last; ++__first, ++__result) { ::new (std::addressof(*__result)) _ValueType(std::move(*__first)); } return __result; } template _OutputIterator __brick_uninitialized_move(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, /*vector=*/std::true_type) noexcept { using __ValueType = typename std::iterator_traits<_OutputIterator>::value_type; using _ReferenceType1 = typename std::iterator_traits<_ForwardIterator>::reference; using _ReferenceType2 = typename std::iterator_traits<_OutputIterator>::reference; return __unseq_backend::__simd_walk_2( __first, __last - __first, __result, [](_ReferenceType1 __x, _ReferenceType2 __y) { ::new (std::addressof(__y)) __ValueType(std::move(__x)); }); } template void __brick_destroy(_Iterator __first, _Iterator __last, /*vector*/ std::false_type) noexcept { using _ValueType = typename std::iterator_traits<_Iterator>::value_type; for (; __first != __last; ++__first) __first->~_ValueType(); } template void __brick_destroy(_Iterator __first, _Iterator __last, /*vector*/ std::true_type) noexcept { using _ValueType = typename std::iterator_traits<_Iterator>::value_type; using _ReferenceType = typename std::iterator_traits<_Iterator>::reference; __unseq_backend::__simd_walk_1(__first, __last - __first, [](_ReferenceType __x) { __x.~_ValueType(); }); } //------------------------------------------------------------------------ // uninitialized copy //------------------------------------------------------------------------ template _OutputIterator __brick_uninitialized_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, /*vector=*/std::false_type) noexcept { using _ValueType = typename std::iterator_traits<_OutputIterator>::value_type; for (; __first != __last; ++__first, ++__result) { ::new (std::addressof(*__result)) _ValueType(*__first); } return __result; } template _OutputIterator __brick_uninitialized_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, /*vector=*/std::true_type) noexcept { using __ValueType = typename std::iterator_traits<_OutputIterator>::value_type; using _ReferenceType1 = typename std::iterator_traits<_ForwardIterator>::reference; using _ReferenceType2 = typename std::iterator_traits<_OutputIterator>::reference; return __unseq_backend::__simd_walk_2( __first, __last - __first, __result, [](_ReferenceType1 __x, _ReferenceType2 __y) { ::new (std::addressof(__y)) __ValueType(__x); }); } } // namespace __internal } // namespace __pstl #endif /* _PSTL_MEMORY_IMPL_H */