Skip to content

Commit 7ff8d12

Browse files
committed
Apply some formatting suggestions
1 parent faa813b commit 7ff8d12

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

include/oneapi/dpl/pstl/algorithm_fwd.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,12 +438,12 @@ _OutputIterator __brick_copy_if(_RandomAccessIterator, _RandomAccessIterator, _O
438438

439439
template <class _RandomAccessIterator, class _DifferenceType, class _IterPredicate>
440440
std::pair<_DifferenceType, _DifferenceType>
441-
__brick_compute_mask(_RandomAccessIterator, _DifferenceType, _IterPredicate, bool*,
441+
__brick_compute_mask(_RandomAccessIterator, _DifferenceType, _IterPredicate, bool*,
442442
/*vector=*/std::false_type) noexcept;
443443

444444
template <class _RandomAccessIterator, class _DifferenceType, class _IterPredicate>
445445
std::pair<_DifferenceType, _DifferenceType>
446-
__brick_compute_mask(_RandomAccessIterator, _DifferenceType, _IterPredicate, bool*,
446+
__brick_compute_mask(_RandomAccessIterator, _DifferenceType, _IterPredicate, bool*,
447447
/*vector=*/std::true_type) noexcept;
448448

449449
template <class _ForwardIterator, class _OutputIterator>

include/oneapi/dpl/pstl/algorithm_impl.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1346,9 +1346,9 @@ __pattern_copy_if(__parallel_tag<_IsVector> __tag, _ExecutionPolicy&& __exec, _R
13461346
const _DifferenceType __n = __last - __first;
13471347
if (_DifferenceType(1) < __n)
13481348
{
1349-
return __parallel_selective_copy(__tag, std::forward<_ExecutionPolicy>(__exec), __first, __n, __result,
1350-
[&__pred](_RandomAccessIterator1 __it, _DifferenceType __idx){ return __pred(__it[__idx]); }
1351-
);
1349+
return __parallel_selective_copy(
1350+
__tag, std::forward<_ExecutionPolicy>(__exec), __first, __n, __result,
1351+
[&__pred](_RandomAccessIterator1 __it, _DifferenceType __idx){ return __pred(__it[__idx]); });
13521352
}
13531353
// trivial sequence - use serial algorithm
13541354
return __internal::__brick_copy_if(__first, __last, __result, __pred, _IsVector{});
@@ -1586,10 +1586,11 @@ __pattern_unique_copy(__parallel_tag<_IsVector> __tag, _ExecutionPolicy&& __exec
15861586
{
15871587
*__result++ = *__first++; // Always copy the first element
15881588
--__n;
1589-
return __parallel_selective_copy(__tag, std::forward<_ExecutionPolicy>(__exec), __first, __n, __result,
1590-
[&__pred](_RandomAccessIterator1 __it, _DifferenceType __idx){
1591-
return !__pred(__it[__idx], __it[__idx - 1]);
1592-
});
1589+
return __parallel_selective_copy(
1590+
__tag, std::forward<_ExecutionPolicy>(__exec), __first, __n, __result,
1591+
[&__pred](_RandomAccessIterator1 __it, _DifferenceType __idx){
1592+
return !__pred(__it[__idx], __it[__idx - 1]);
1593+
});
15931594
}
15941595
// trivial sequence - use serial algorithm
15951596
return __internal::__brick_unique_copy(__first, __last, __result, __pred, _IsVector{});
@@ -2325,7 +2326,8 @@ __pattern_partition_copy(__parallel_tag<_IsVector>, _ExecutionPolicy&& __exec, _
23252326
__backend_tag{}, std::forward<_ExecutionPolicy>(__exec), __n,
23262327
std::make_pair(_DifferenceType(0), _DifferenceType(0)),
23272328
[=, &__pred](_DifferenceType __i, _DifferenceType __len) { // Reduce
2328-
return __internal::__brick_compute_mask(__first + __i, __len,
2329+
return __internal::__brick_compute_mask(
2330+
__first + __i, __len,
23292331
[&__pred](_RandomAccessIterator1 __it, _DifferenceType __idx){ return __pred(__it[__idx]);},
23302332
__mask + __i, _IsVector{});
23312333
},

0 commit comments

Comments
 (0)