Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Hoeflinger <[email protected]>
  • Loading branch information
danhoeflinger committed Apr 29, 2024
1 parent 0513bca commit b66ea51
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 8 additions & 6 deletions include/oneapi/dpl/pstl/hetero/dpcpp/sycl_iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,16 @@ using __usm_host_alloc_vec_iter =
// default, usm_shared, and usm_host. If all are distinct, it is very unlikely any non-usm based allocator
// could be confused with a usm allocator.
template <typename Iter>
constexpr bool __vector_iter_distinguishes_by_allocator_v = !std::is_same_v<__default_alloc_vec_iter<Iter>, __usm_shared_alloc_vec_iter<Iter>> &&
!std::is_same_v<__default_alloc_vec_iter<Iter>, __usm_host_alloc_vec_iter<Iter>> &&
!std::is_same_v<__usm_host_alloc_vec_iter<Iter>, __usm_shared_alloc_vec_iter<Iter>>;
constexpr bool __vector_iter_distinguishes_by_allocator_v =
!std::is_same_v<__default_alloc_vec_iter<Iter>, __usm_shared_alloc_vec_iter<Iter>> &&
!std::is_same_v<__default_alloc_vec_iter<Iter>, __usm_host_alloc_vec_iter<Iter>> &&
!std::is_same_v<__usm_host_alloc_vec_iter<Iter>, __usm_shared_alloc_vec_iter<Iter>>;

template <typename Iter>
constexpr bool __is_known_usm_vector_iter_v = oneapi::dpl::__internal::__vector_iter_distinguishes_by_allocator_v<Iter> &&
(std::is_same_v<Iter, oneapi::dpl::__internal::__usm_shared_alloc_vec_iter<Iter>> ||
std::is_same_v<Iter, oneapi::dpl::__internal::__usm_host_alloc_vec_iter<Iter>>);
constexpr bool __is_known_usm_vector_iter_v =
oneapi::dpl::__internal::__vector_iter_distinguishes_by_allocator_v<Iter> &&
(std::is_same_v<Iter, oneapi::dpl::__internal::__usm_shared_alloc_vec_iter<Iter>> ||
std::is_same_v<Iter, oneapi::dpl::__internal::__usm_host_alloc_vec_iter<Iter>>);

} // namespace __internal

Expand Down
4 changes: 3 additions & 1 deletion include/oneapi/dpl/pstl/hetero/dpcpp/utils_ranges_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ struct is_passed_directly<oneapi::dpl::transform_iterator<Iter, Unary>> : is_pas

template <typename SourceIterator, typename IndexIterator>
struct is_passed_directly<oneapi::dpl::permutation_iterator<SourceIterator, IndexIterator>>
: ::std::conjunction<is_passed_directly<SourceIterator>, is_passed_directly<typename oneapi::dpl::permutation_iterator<SourceIterator, IndexIterator>::IndexMap>>
: ::std::conjunction<
is_passed_directly<SourceIterator>,
is_passed_directly<typename oneapi::dpl::permutation_iterator<SourceIterator, IndexIterator>::IndexMap>>
{
};

Expand Down

0 comments on commit b66ea51

Please sign in to comment.