Skip to content

Commit

Permalink
Restore the removed test-case, minor stylistic corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitriy-sobolev committed Dec 12, 2024
1 parent 77566ce commit 865b88a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions include/oneapi/dpl/pstl/hetero/dpcpp/sycl_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
# define _ONEDPL_LIBSYCL_VERSION \
(__LIBSYCL_MAJOR_VERSION * 10000 + __LIBSYCL_MINOR_VERSION * 100 + __LIBSYCL_PATCH_VERSION)
#endif
#define _ONEDPL_LIBSYCL_VERSION_LESS_THAN(_ONEDPL_SYCL_VERSION_NUMBER) \
(_ONEDPL_LIBSYCL_VERSION && _ONEDPL_LIBSYCL_VERSION < _ONEDPL_SYCL_VERSION_NUMBER)
#define _ONEDPL_LIBSYCL_VERSION_LESS_THAN(_VERSION) (_ONEDPL_LIBSYCL_VERSION && _ONEDPL_LIBSYCL_VERSION < _VERSION)
#if _ONEDPL_FPGA_DEVICE
# if _ONEDPL_LIBSYCL_VERSION >= 50400
Expand Down
4 changes: 2 additions & 2 deletions include/oneapi/dpl/pstl/hetero/dpcpp/unseq_backend_sycl.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@ using __has_known_identity = ::std::conditional_t<
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__minimum<void>>,
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__maximum<_Tp>>,
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__maximum<void>>>>>,
# else //_ONEDPL_SYCL_KNOWN_IDENTITY_PRESENT
# else
typename ::std::conjunction<
::std::is_arithmetic<_Tp>,
::std::disjunction<::std::is_same<::std::decay_t<_BinaryOp>, ::std::plus<_Tp>>,
::std::is_same<::std::decay_t<_BinaryOp>, ::std::plus<void>>,
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__plus<_Tp>>,
::std::is_same<::std::decay_t<_BinaryOp>, __dpl_sycl::__plus<void>>>>,
# endif //_ONEDPL_SYCL_KNOWN_IDENTITY_PRESENT
# endif
::std::false_type>; // This is for the case of __can_use_known_identity<_Tp>==false

#else //_ONEDPL_USE_GROUP_ALGOS && defined(SYCL_IMPLEMENTATION_INTEL)
Expand Down
7 changes: 7 additions & 0 deletions test/general/test_policies.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ main()

// make_device_policy
test_policy_instance(TestUtils::make_device_policy<class Kernel_11>(q));
#if TEST_LIBSYCL_VERSION && TEST_LIBSYCL_VERSION < 60000
// make_device_policy requires a sycl::queue as an argument.
// Currently, there is no implicit conversion (implicit syc::queue constructor by a device selector)
// from a device selector to a queue.
// The same test call with explicit queue creation we have below in line 78.
test_policy_instance(TestUtils::make_device_policy<class Kernel_12>(TestUtils::default_selector));
#endif
test_policy_instance(TestUtils::make_device_policy<class Kernel_13>(sycl::device{TestUtils::default_selector}));
test_policy_instance(TestUtils::make_device_policy<class Kernel_14>(sycl::queue{TestUtils::default_selector, sycl::property::queue::in_order()}));
test_policy_instance(TestUtils::make_device_policy<class Kernel_15>(dpcpp_default));
Expand Down

0 comments on commit 865b88a

Please sign in to comment.