Skip to content

Commit

Permalink
Fix warning and compilation errors (#1849)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xewar313 authored and mmichel11 committed Sep 25, 2024
1 parent 3827634 commit 01c9755
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/oneapi/dpl/pstl/execution_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,25 @@ __select_backend(oneapi::dpl::execution::parallel_unsequenced_policy, _IteratorT
namespace __ranges
{

::oneapi::dpl::__internal::__serial_tag<std::false_type>
inline ::oneapi::dpl::__internal::__serial_tag<std::false_type>
__select_backend(oneapi::dpl::execution::sequenced_policy)
{
return {};
}

::oneapi::dpl::__internal::__serial_tag<std::true_type> //vectorization allowed
inline ::oneapi::dpl::__internal::__serial_tag<std::true_type> //vectorization allowed
__select_backend(oneapi::dpl::execution::unsequenced_policy)
{
return {};
}

::oneapi::dpl::__internal::__parallel_tag<std::false_type>
inline ::oneapi::dpl::__internal::__parallel_tag<std::false_type>
__select_backend(oneapi::dpl::execution::parallel_policy)
{
return {};
}

::oneapi::dpl::__internal::__parallel_tag<std::true_type> //vectorization allowed
inline ::oneapi::dpl::__internal::__parallel_tag<std::true_type> //vectorization allowed
__select_backend(oneapi::dpl::execution::parallel_unsequenced_policy)
{
return {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ struct __subgroup_radix_sort
auto
operator()(sycl::queue __q, _RangeIn&& __src, _Proj __proj, _SLM_tag_val, _SLM_counter)
{
constexpr std::uint16_t __req_sub_group_size = 16;
uint16_t __n = __src.size();
assert(__n <= __block_size * __wg_size);

Expand All @@ -164,9 +163,12 @@ struct __subgroup_radix_sort
auto __counter_lacc = __buf_count.get_acc(__cgh);

__cgh.parallel_for<_Name...>(
__range,
([=](sycl::nd_item<1> __it)[[_ONEDPL_SYCL_REQD_SUB_GROUP_SIZE_IF_SUPPORTED(__req_sub_group_size)]] {
union __storage { _ValT __v[__block_size]; __storage(){} } __values;
__range, ([=](sycl::nd_item<1> __it) [[_ONEDPL_SYCL_REQD_SUB_GROUP_SIZE_IF_SUPPORTED(16)]] {
union __storage
{
_ValT __v[__block_size];
__storage() {}
} __values;
uint16_t __wi = __it.get_local_linear_id();
uint16_t __begin_bit = 0;
constexpr uint16_t __end_bit = sizeof(_KeyT) * ::std::numeric_limits<unsigned char>::digits;
Expand Down

0 comments on commit 01c9755

Please sign in to comment.