From 9af71c6a09b57b556883671aff42b097a446fc63 Mon Sep 17 00:00:00 2001 From: timmiesmith Date: Tue, 25 Jun 2024 14:03:44 -0500 Subject: [PATCH 1/3] Removing user-defined copy ctors in favor of the default to resolve static code analysis errors. --- include/oneapi/dpl/pstl/unseq_backend_simd.h | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/include/oneapi/dpl/pstl/unseq_backend_simd.h b/include/oneapi/dpl/pstl/unseq_backend_simd.h index f3515765b6c..09f90175ec8 100644 --- a/include/oneapi/dpl/pstl/unseq_backend_simd.h +++ b/include/oneapi/dpl/pstl/unseq_backend_simd.h @@ -661,10 +661,7 @@ __simd_min_element(_ForwardIterator __first, _Size __n, _Compare __comp) noexcep : __min_val(val), __min_ind(0), __min_comp(const_cast<_Compare*>(comp)) { } - _ComplexType(const _ComplexType& __obj) - : __min_val(__obj.__min_val), __min_ind(__obj.__min_ind), __min_comp(__obj.__min_comp) - { - } + _ComplexType(const _ComplexType& __obj) = default; _ONEDPL_PRAGMA_DECLARE_SIMD void @@ -725,11 +722,7 @@ __simd_minmax_element(_ForwardIterator __first, _Size __n, _Compare __comp) noex __minmax_comp(const_cast<_Compare*>(comp)) { } - _ComplexType(const _ComplexType& __obj) - : __min_val(__obj.__min_val), __max_val(__obj.__max_val), __min_ind(__obj.__min_ind), - __max_ind(__obj.__max_ind), __minmax_comp(__obj.__minmax_comp) - { - } + _ComplexType(const _ComplexType& __obj) = default; _ONEDPL_PRAGMA_DECLARE_SIMD void From ae4745dfde7e5cc3931730cc54a9939e1643f45a Mon Sep 17 00:00:00 2001 From: timmiesmith Date: Tue, 25 Jun 2024 16:29:20 -0500 Subject: [PATCH 2/3] Removing noexcept keyword from functions used in uninitialized memory algorithms that may throw exceptions. --- include/oneapi/dpl/pstl/algorithm_impl.h | 2 +- include/oneapi/dpl/pstl/unseq_backend_simd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/oneapi/dpl/pstl/algorithm_impl.h b/include/oneapi/dpl/pstl/algorithm_impl.h index 5b7220bbef6..c4e9e29ecdc 100644 --- a/include/oneapi/dpl/pstl/algorithm_impl.h +++ b/include/oneapi/dpl/pstl/algorithm_impl.h @@ -104,7 +104,7 @@ __for_each_n_it_serial(_ForwardIterator __first, _Size __n, _Function __f) //------------------------------------------------------------------------ template void -__brick_walk1(_ForwardIterator __first, _ForwardIterator __last, _Function __f, /*vector=*/::std::false_type) noexcept +__brick_walk1(_ForwardIterator __first, _ForwardIterator __last, _Function __f, /*vector=*/::std::false_type) { ::std::for_each(__first, __last, __f); } diff --git a/include/oneapi/dpl/pstl/unseq_backend_simd.h b/include/oneapi/dpl/pstl/unseq_backend_simd.h index 09f90175ec8..e06a0adb46c 100644 --- a/include/oneapi/dpl/pstl/unseq_backend_simd.h +++ b/include/oneapi/dpl/pstl/unseq_backend_simd.h @@ -34,7 +34,7 @@ const ::std::size_t __lane_size = 64; template _Iterator -__simd_walk_1(_Iterator __first, _DifferenceType __n, _Function __f) noexcept +__simd_walk_1(_Iterator __first, _DifferenceType __n, _Function __f) { _ONEDPL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) From d96b2f4a0b64f927b6589443784a1f011eff581b Mon Sep 17 00:00:00 2001 From: timmiesmith Date: Wed, 26 Jun 2024 13:01:07 -0500 Subject: [PATCH 3/3] updating forward declaration. --- include/oneapi/dpl/pstl/algorithm_fwd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/oneapi/dpl/pstl/algorithm_fwd.h b/include/oneapi/dpl/pstl/algorithm_fwd.h index a462c7f1584..28aa145b7c5 100644 --- a/include/oneapi/dpl/pstl/algorithm_fwd.h +++ b/include/oneapi/dpl/pstl/algorithm_fwd.h @@ -56,7 +56,7 @@ __pattern_any_of(__parallel_tag<_IsVector>, _ExecutionPolicy&&, _RandomAccessIte template void __brick_walk1(_ForwardIterator, _ForwardIterator, _Function, - /*vector=*/::std::false_type) noexcept; + /*vector=*/::std::false_type); template void __brick_walk1(_RandomAccessIterator, _RandomAccessIterator, _Function,