Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressing static analysis errors #1640

Merged
merged 3 commits into from
Jun 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the CI, it looks like there is a forward declaration you also need to change.

__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
Loading