Skip to content

Commit

Permalink
Addressing static analysis errors (#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
timmiesmith authored Jun 27, 2024
1 parent 71de137 commit 850fa69
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion include/oneapi/dpl/pstl/algorithm_fwd.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ __pattern_any_of(__parallel_tag<_IsVector>, _ExecutionPolicy&&, _RandomAccessIte

template <class _ForwardIterator, class _Function>
void __brick_walk1(_ForwardIterator, _ForwardIterator, _Function,
/*vector=*/::std::false_type) noexcept;
/*vector=*/::std::false_type);

template <class _RandomAccessIterator, class _Function>
void __brick_walk1(_RandomAccessIterator, _RandomAccessIterator, _Function,
Expand Down
2 changes: 1 addition & 1 deletion include/oneapi/dpl/pstl/algorithm_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ __for_each_n_it_serial(_ForwardIterator __first, _Size __n, _Function __f)
//------------------------------------------------------------------------
template <class _ForwardIterator, class _Function>
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);
}
Expand Down
13 changes: 3 additions & 10 deletions include/oneapi/dpl/pstl/unseq_backend_simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ::std::size_t __lane_size = 64;

template <class _Iterator, class _DifferenceType, class _Function>
_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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 850fa69

Please sign in to comment.