Skip to content

Commit c2d06d9

Browse files
include/oneapi/dpl/pstl/algorithm_impl.h - fix compile error: unused wariable
1 parent 95c3fc7 commit c2d06d9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

include/oneapi/dpl/pstl/algorithm_impl.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3680,15 +3680,19 @@ __parallel_set_op(__parallel_tag<_IsVector> __tag, _ExecutionPolicy&& __exec, _R
36803680
__set_union_op, __comp, __proj1, __proj2, __buf_raw_data_begin,
36813681
__mask_bufs};
36823682

3683-
auto __apex_pred = [ [[maybe_unused]] __n_out, &__res_reachedOutPos, &__scan_pred ](const _SetRange& __total)
3684-
{
3683+
auto __apex_pred = [__n_out, &__res_reachedOutPos, &__scan_pred](const _SetRange& __total) {
36853684
//final scan
36863685
__scan_pred(/* 0 */ _DifferenceType1{}, /* 0 */ _DifferenceType1{}, __total);
36873686

36883687
if constexpr (!__Bounded)
3688+
{
3689+
(void)__n_out;
36893690
__res_reachedOutPos = __total.__data[0].__pos + __total.__data[0].__len;
3691+
}
36903692
else
3693+
{
36913694
__res_reachedOutPos = std::min(__n_out, __total.__data[0].__pos + __total.__data[0].__len);
3695+
}
36923696
};
36933697

36943698
__par_backend::__parallel_strict_scan(__backend_tag{}, __exec, __n1, _SetRange(), __reduce_pred, __combine_pred,

0 commit comments

Comments
 (0)