Skip to content

Commit

Permalink
[pstl] Fix -Wundef errors in the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed May 26, 2021
1 parent 2fdf8bb commit 3b9a1bb
Show file tree
Hide file tree
Showing 43 changed files with 148 additions and 126 deletions.
22 changes: 11 additions & 11 deletions pstl/include/pstl/internal/algorithm_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,7 @@ __brick_copy_if(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _
_UnaryPredicate __pred,
/*vector=*/std::true_type) noexcept
{
#if (_PSTL_MONOTONIC_PRESENT)
#if defined(_PSTL_MONOTONIC_PRESENT)
return __unseq_backend::__simd_copy_if(__first, __last - __first, __result, __pred);
#else
return std::copy_if(__first, __last, __result, __pred);
Expand Down Expand Up @@ -1038,7 +1038,7 @@ void
__brick_copy_by_mask(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result,
bool* __restrict __mask, _Assigner __assigner, /*vector=*/std::true_type) noexcept
{
#if (_PSTL_MONOTONIC_PRESENT)
#if defined(_PSTL_MONOTONIC_PRESENT)
__unseq_backend::__simd_copy_by_mask(__first, __last - __first, __result, __mask, __assigner);
#else
__internal::__brick_copy_by_mask(__first, __last, __result, __mask, __assigner, std::false_type());
Expand Down Expand Up @@ -1071,7 +1071,7 @@ __brick_partition_by_mask(_RandomAccessIterator1 __first, _RandomAccessIterator1
_RandomAccessIterator2 __out_true, _RandomAccessIterator3 __out_false, bool* __mask,
/*vector=*/std::true_type) noexcept
{
#if (_PSTL_MONOTONIC_PRESENT)
#if defined(_PSTL_MONOTONIC_PRESENT)
__unseq_backend::__simd_partition_by_mask(__first, __last - __first, __out_true, __out_false, __mask);
#else
__internal::__brick_partition_by_mask(__first, __last, __out_true, __out_false, __mask, std::false_type());
Expand Down Expand Up @@ -1319,7 +1319,7 @@ _RandomAccessIterator2
__brick_unique_copy(_RandomAccessIterator1 __first, _RandomAccessIterator1 __last, _RandomAccessIterator2 __result,
_BinaryPredicate __pred, /*vector=*/std::true_type) noexcept
{
#if (_PSTL_MONOTONIC_PRESENT)
#if defined(_PSTL_MONOTONIC_PRESENT)
return __unseq_backend::__simd_unique_copy(__first, __last - __first, __result, __pred);
#else
return std::unique_copy(__first, __last, __result, __pred);
Expand Down Expand Up @@ -1536,7 +1536,7 @@ _ForwardIterator
__brick_rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last,
/*is_vector=*/std::false_type) noexcept
{
#if _PSTL_CPP11_STD_ROTATE_BROKEN
#if defined(_PSTL_CPP11_STD_ROTATE_BROKEN)
std::rotate(__first, __middle, __last);
return std::next(__first, std::distance(__middle, __last));
#else
Expand Down Expand Up @@ -2055,7 +2055,7 @@ __brick_partition_copy(_RandomAccessIterator1 __first, _RandomAccessIterator1 __
_RandomAccessIterator3 __out_false, _UnaryPredicate __pred,
/*is_vector=*/std::true_type) noexcept
{
#if (_PSTL_MONOTONIC_PRESENT)
#if defined(_PSTL_MONOTONIC_PRESENT)
return __unseq_backend::__simd_partition_copy(__first, __last - __first, __out_true, __out_false, __pred);
#else
return std::partition_copy(__first, __last, __out_true, __out_false, __pred);
Expand Down Expand Up @@ -2232,7 +2232,7 @@ __pattern_partial_sort_copy(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __
_RandomAccessIterator1 __j1 = __first + (__j - __d_first);

// 1. Copy elements from input to output
#if !_PSTL_ICC_18_OMP_SIMD_BROKEN
#if !defined(_PSTL_ICC_18_OMP_SIMD_BROKEN)
__internal::__brick_copy(__i1, __j1, __i, __is_vector);
#else
std::copy(__i1, __j1, __i);
Expand Down Expand Up @@ -2583,7 +2583,7 @@ _RandomAccessIterator
__brick_remove_if(_RandomAccessIterator __first, _RandomAccessIterator __last, _UnaryPredicate __pred,
/* __is_vector = */ std::true_type) noexcept
{
#if _PSTL_MONOTONIC_PRESENT
#if defined(_PSTL_MONOTONIC_PRESENT)
return __unseq_backend::__simd_remove_if(__first, __last - __first, __pred);
#else
return std::remove_if(__first, __last, __pred);
Expand Down Expand Up @@ -3437,7 +3437,7 @@ _RandomAccessIterator
__brick_min_element(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
/* __is_vector = */ std::true_type) noexcept
{
#if _PSTL_UDR_PRESENT
#if defined(_PSTL_UDR_PRESENT)
return __unseq_backend::__simd_min_element(__first, __last - __first, __comp);
#else
return std::min_element(__first, __last, __comp);
Expand Down Expand Up @@ -3492,7 +3492,7 @@ std::pair<_RandomAccessIterator, _RandomAccessIterator>
__brick_minmax_element(_RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp,
/* __is_vector = */ std::true_type) noexcept
{
#if _PSTL_UDR_PRESENT
#if defined(_PSTL_UDR_PRESENT)
return __unseq_backend::__simd_minmax_element(__first, __last - __first, __comp);
#else
return std::minmax_element(__first, __last, __comp);
Expand Down Expand Up @@ -3542,7 +3542,7 @@ std::pair<_ForwardIterator1, _ForwardIterator2>
__mismatch_serial(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2,
_ForwardIterator2 __last2, _BinaryPredicate __pred)
{
#if _PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT
#if defined(_PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT)
return std::mismatch(__first1, __last1, __first2, __last2, __pred);
#else
for (; __first1 != __last1 && __first2 != __last2 && __pred(*__first1, *__first2); ++__first1, ++__first2)
Expand Down
2 changes: 1 addition & 1 deletion pstl/include/pstl/internal/execution_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ struct is_execution_policy<__pstl::execution::unsequenced_policy> : std::true_ty
{
};

#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
#if defined(_PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT)
template <class T>
constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy<T>::value;
#endif
Expand Down
4 changes: 2 additions & 2 deletions pstl/include/pstl/internal/execution_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ using __allow_parallel =
template <typename _ExecutionPolicy, typename... _IteratorTypes>
typename std::conjunction<__allow_vector<_ExecutionPolicy>,
__is_random_access_iterator<_IteratorTypes>...>::type
__is_vectorization_preferred(_ExecutionPolicy&& __exec)
__is_vectorization_preferred(_ExecutionPolicy&&)
{
return {};
}

template <typename _ExecutionPolicy, typename... _IteratorTypes>
typename std::conjunction<__allow_parallel<_ExecutionPolicy>,
__is_random_access_iterator<_IteratorTypes>...>::type
__is_parallelization_preferred(_ExecutionPolicy&& __exec)
__is_parallelization_preferred(_ExecutionPolicy&&)
{
return {};
}
Expand Down
4 changes: 2 additions & 2 deletions pstl/include/pstl/internal/glue_execution_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ namespace std
{
// Type trait
using __pstl::execution::is_execution_policy;
#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
# if __INTEL_COMPILER
#if defined(_PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT)
# if defined(__INTEL_COMPILER)
template <class T>
constexpr bool is_execution_policy_v = is_execution_policy<T>::value;
# else
Expand Down
2 changes: 1 addition & 1 deletion pstl/include/pstl/internal/numeric_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ __brick_transform_scan(_RandomAccessIterator __first, _RandomAccessIterator __la
_UnaryOperation __unary_op, _Tp __init, _BinaryOperation __binary_op, _Inclusive,
/*is_vector=*/std::true_type) noexcept
{
#if (_PSTL_UDS_PRESENT)
#if defined(_PSTL_UDS_PRESENT)
return __unseq_backend::__simd_scan(__first, __last - __first, __result, __unary_op, __init, __binary_op,
_Inclusive());
#else
Expand Down
72 changes: 47 additions & 25 deletions pstl/include/pstl/internal/pstl_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@
// the actual GCC version on the system.
#define _PSTL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)

#if __clang__
#if defined(__clang__)
// according to clang documentation, version can be vendor specific
# define _PSTL_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__)
#endif

// Enable SIMD for compilers that support OpenMP 4.0
#if (_OPENMP >= 201307) || (__INTEL_COMPILER >= 1600) || (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || \
#if (defined(_OPENMP) && _OPENMP >= 201307) || \
(defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1600) || \
(!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || \
defined(__clang__)
# define _PSTL_PRAGMA_SIMD _PSTL_PRAGMA(omp simd)
# define _PSTL_PRAGMA_DECLARE_SIMD _PSTL_PRAGMA(omp declare simd)
Expand All @@ -81,13 +83,13 @@
# define _PSTL_PRAGMA_SIMD_REDUCTION(PRM)
#endif //Enable SIMD

#if (__INTEL_COMPILER)
#if defined(__INTEL_COMPILER)
# define _PSTL_PRAGMA_FORCEINLINE _PSTL_PRAGMA(forceinline)
#else
# define _PSTL_PRAGMA_FORCEINLINE
#endif

#if (__INTEL_COMPILER >= 1900)
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900
# define _PSTL_PRAGMA_SIMD_SCAN(PRM) _PSTL_PRAGMA(omp simd reduction(inscan, PRM))
# define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan inclusive(PRM))
# define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM) _PSTL_PRAGMA(omp scan exclusive(PRM))
Expand All @@ -100,32 +102,47 @@
// Should be defined to 1 for environments with a vendor implementation of C++17 execution policies
#define _PSTL_CPP17_EXECUTION_POLICIES_PRESENT (_MSC_VER >= 1912)

#define _PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT \
(_MSC_VER >= 1900 || __cplusplus >= 201300L || __cpp_lib_robust_nonmodifying_seq_ops == 201304)
#define _PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT \
(_MSC_VER >= 1900 || __cplusplus >= 201402L || __cpp_lib_make_reverse_iterator == 201402)
#define _PSTL_CPP14_INTEGER_SEQUENCE_PRESENT (_MSC_VER >= 1900 || __cplusplus >= 201402L)
#define _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT \
(!__INTEL_COMPILER || __INTEL_COMPILER >= 1700) && (_MSC_FULL_VER >= 190023918 || __cplusplus >= 201402L)
#if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
__cplusplus >= 201300L || \
__cpp_lib_robust_nonmodifying_seq_ops == 201304
# define _PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT
#endif
#if (defined(_MSC_VER) && _MSC_VER >= 1900) || \
__cplusplus >= 201402L || \
__cpp_lib_make_reverse_iterator == 201402
# define _PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT
#endif
#if (defined(_MSC_VER) && _MSC_VER >= 1900) || __cplusplus >= 201402L
# define _PSTL_CPP14_INTEGER_SEQUENCE_PRESENT
#endif
#if (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1700) || \
(defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 190023918) || \
__cplusplus >= 201402L
# define _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT
#endif

#define _PSTL_EARLYEXIT_PRESENT (__INTEL_COMPILER >= 1800)
#define _PSTL_MONOTONIC_PRESENT (__INTEL_COMPILER >= 1800)
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1800
# define _PSTL_EARLYEXIT_PRESENT
# define _PSTL_MONOTONIC_PRESENT
#endif

#if (__INTEL_COMPILER >= 1900 || !defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900 || _OPENMP >= 201307)
# define _PSTL_UDR_PRESENT 1
#else
# define _PSTL_UDR_PRESENT 0
#if (defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900) || \
(!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || \
(defined(_OPENMP) && _OPENMP >= 201307)
# define _PSTL_UDR_PRESENT

This comment has been minimized.

Copy link
@jwakely

jwakely May 28, 2024

Contributor

Changing how these macros are defined was not required to fix the uses of these macros that cause -Wundef warnings, but causes other problems downstream: oneapi-src/oneDPL#1602

This comment has been minimized.

Copy link
@ldionne

ldionne Jun 5, 2024

Author Member

FWIW if you make a patch that fixes the issue you're running into under pstl/, we'll take it. We don't use this code base in libc++ anymore. I'm sorry this change ended up causing issues.

This comment has been minimized.

Copy link
@jwakely

jwakely Jun 12, 2024

Contributor

I'm kinda tempted to revert this entire change, at least in our copy.

The change seems to have altered the PSTL API, e.g. previously users could define PSTL_USAGE_WARNINGS to either 0 or 1 (or anything non-zero) to turn some warnings on or off:

// Check the user-defined macro for warnings
#if defined(PSTL_USAGE_WARNINGS)
#    undef _PSTL_USAGE_WARNINGS
#    define _PSTL_USAGE_WARNINGS PSTL_USAGE_WARNINGS
// Check the internal macro for warnings
#elif !defined(_PSTL_USAGE_WARNINGS)
#    define _PSTL_USAGE_WARNINGS 0
#endif

Now (since the follow-up commit c4823cc) if they define it to 0, they get warnings:

// Check the user-defined macro for warnings
#if defined(PSTL_USAGE_WARNINGS)
#    define _PSTL_USAGE_WARNINGS
#endif

This altered the user-facing API, causing unwanted warnings in libstdc++ (because we have an incomplete backport of these -Wundef changes). This is awkward to unpick now.

This comment has been minimized.

Copy link
@ldionne

ldionne Jun 12, 2024

Author Member

Feel free to revert it here if you prefer. Whatever's easiest for you. Libc++ is not using this codebase. We should actually figure out what we want to do with it going forward.

#endif

#define _PSTL_UDS_PRESENT (__INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626)
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626
# define _PSTL_UDS_PRESENT
#endif

#if _PSTL_EARLYEXIT_PRESENT
#if defined(_PSTL_EARLYEXIT_PRESENT)
# define _PSTL_PRAGMA_SIMD_EARLYEXIT _PSTL_PRAGMA(omp simd early_exit)
#else
# define _PSTL_PRAGMA_SIMD_EARLYEXIT
#endif

#if _PSTL_MONOTONIC_PRESENT
#if defined(_PSTL_MONOTONIC_PRESENT)
# define _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) _PSTL_PRAGMA(omp ordered simd monotonic(PRM))
# define _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) _PSTL_PRAGMA(omp ordered simd monotonic(PRM1, PRM2))
#else
Expand All @@ -143,7 +160,7 @@
#define _PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP) \
_PSTL_PRAGMA(omp declare reduction(NAME:OP : omp_out(omp_in)) initializer(omp_priv = omp_orig))

#if (__INTEL_COMPILER >= 1600)
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER >= 1600
# define _PSTL_PRAGMA_VECTOR_UNALIGNED _PSTL_PRAGMA(vector unaligned)
#else
# define _PSTL_PRAGMA_VECTOR_UNALIGNED
Expand All @@ -156,15 +173,15 @@
# define _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED
#endif

#if _MSC_VER || __INTEL_COMPILER //the preprocessors don't type a message location
#if defined(_MSC_VER) || defined(__INTEL_COMPILER) // the preprocessors don't type a message location
# define _PSTL_PRAGMA_LOCATION __FILE__ ":" _PSTL_STRING(__LINE__) ": [Parallel STL message]: "
#else
# define _PSTL_PRAGMA_LOCATION " [Parallel STL message]: "
#endif

#define _PSTL_PRAGMA_MESSAGE_IMPL(x) _PSTL_PRAGMA(message(_PSTL_STRING_CONCAT(_PSTL_PRAGMA_LOCATION, x)))

#if _PSTL_USAGE_WARNINGS
#if defined(_PSTL_USAGE_WARNINGS)
# define _PSTL_PRAGMA_MESSAGE(x) _PSTL_PRAGMA_MESSAGE_IMPL(x)
# define _PSTL_PRAGMA_MESSAGE_POLICIES(x) _PSTL_PRAGMA_MESSAGE_IMPL(x)
#else
Expand All @@ -173,8 +190,13 @@
#endif

// broken macros
#define _PSTL_CPP11_STD_ROTATE_BROKEN ((__GLIBCXX__ && __GLIBCXX__ < 20150716) || (_MSC_VER && _MSC_VER < 1800))
#if (defined(__GLIBCXX__) && __GLIBCXX__ < 20150716) || \
(defined(_MSC_VER) && _MSC_VER < 1800)
# define _PSTL_CPP11_STD_ROTATE_BROKEN
#endif

#define _PSTL_ICC_18_OMP_SIMD_BROKEN (__INTEL_COMPILER == 1800)
#if defined(__INTEL_COMPILER) && __INTEL_COMPILER == 1800
# define _PSTL_ICC_18_OMP_SIMD_BROKEN
#endif

#endif /* _PSTL_CONFIG_H */
8 changes: 4 additions & 4 deletions pstl/include/pstl/internal/unseq_backend_simd.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ template <class _Index, class _DifferenceType, class _Pred>
bool
__simd_or(_Index __first, _DifferenceType __n, _Pred __pred) noexcept
{
#if _PSTL_EARLYEXIT_PRESENT
#if defined(_PSTL_EARLYEXIT_PRESENT)
_DifferenceType __i;
_PSTL_PRAGMA_VECTOR_UNALIGNED
_PSTL_PRAGMA_SIMD_EARLYEXIT
Expand Down Expand Up @@ -105,7 +105,7 @@ template <class _Index, class _DifferenceType, class _Compare>
_Index
__simd_first(_Index __first, _DifferenceType __begin, _DifferenceType __end, _Compare __comp) noexcept
{
#if _PSTL_EARLYEXIT_PRESENT
#if defined(_PSTL_EARLYEXIT_PRESENT)
_DifferenceType __i = __begin;
_PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part
_PSTL_PRAGMA_SIMD_EARLYEXIT for (; __i < __end; ++__i)
Expand Down Expand Up @@ -165,7 +165,7 @@ template <class _Index1, class _DifferenceType, class _Index2, class _Pred>
std::pair<_Index1, _Index2>
__simd_first(_Index1 __first1, _DifferenceType __n, _Index2 __first2, _Pred __pred) noexcept
{
#if _PSTL_EARLYEXIT_PRESENT
#if defined(_PSTL_EARLYEXIT_PRESENT)
_DifferenceType __i = 0;
_PSTL_PRAGMA_VECTOR_UNALIGNED
_PSTL_PRAGMA_SIMD_EARLYEXIT
Expand Down Expand Up @@ -387,7 +387,7 @@ __simd_adjacent_find(_Index __first, _Index __last, _BinaryPredicate __pred, boo
typedef typename std::iterator_traits<_Index>::difference_type _DifferenceType;
_DifferenceType __i = 0;

#if _PSTL_EARLYEXIT_PRESENT
#if defined(_PSTL_EARLYEXIT_PRESENT)
//Some compiler versions fail to compile the following loop when iterators are used. Indices are used instead
const _DifferenceType __n = __last - __first - 1;
_PSTL_PRAGMA_VECTOR_UNALIGNED
Expand Down
4 changes: 2 additions & 2 deletions pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ using namespace TestUtils;

struct test_one_policy
{
#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || \
_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specialization by policy type, in case of broken configuration
#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) || \
defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) // dummy specialization by policy type, in case of broken configuration
template <typename BiDirIt1, typename Size, typename Generator1, typename Generator2, typename Compare>
void
operator()(pstl::execution::unsequenced_policy, BiDirIt1 first1, BiDirIt1 last1, BiDirIt1 first2, BiDirIt1 last2,
Expand Down
2 changes: 1 addition & 1 deletion pstl/test/std/algorithms/alg.merge/merge.pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ main()
test_merge_by_type<int32_t>([](size_t v) { return (v % 2 == 0 ? v : -v) * 3; }, [](size_t v) { return v * 2; });
test_merge_by_type<float64_t>([](size_t v) { return float64_t(v); }, [](size_t v) { return float64_t(v - 100); });

#if !_PSTL_ICC_16_17_TEST_64_TIMEOUT
#if !defined(_PSTL_ICC_16_17_TEST_64_TIMEOUT)
test_merge_by_type<Wrapper<int16_t>>([](size_t v) { return Wrapper<int16_t>(v % 100); },
[](size_t v) { return Wrapper<int16_t>(v % 10); });
#endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace TestUtils;

struct run_copy_if
{
#if _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN // dummy specializations to skip testing in case of broken configuration
#if defined(_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN) // dummy specializations to skip testing in case of broken configuration
template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size,
typename Predicate, typename T>
void
Expand Down Expand Up @@ -132,11 +132,11 @@ main()
test<int32_t>(-666, [](const int32_t& x) { return x != 42; },
[](size_t j) { return ((j + 1) % 5 & 2) != 0 ? int32_t(j + 1) : 42; });

#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN
#if !defined(_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN)
test<Number>(Number(42, OddTag()), IsMultiple(3, OddTag()), [](int32_t j) { return Number(j, OddTag()); });
#endif

#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN
#if !defined(_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN)
test<int32_t>(-666, [](const int32_t&) { return true; }, [](size_t j) { return j; }, false);
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ using namespace TestUtils;
struct test_one_policy
{
//dummy specialization by policy type, in case of broken configuration
#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN
#if defined(_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN) || defined(_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN)

template <typename Iterator1, typename Predicate>
void
Expand Down Expand Up @@ -90,7 +90,7 @@ main()
test<float64_t>([](const float64_t x) { return x < 0; });
test<int32_t>([](const int32_t x) { return x > 1000; });
test<uint16_t>([](const uint16_t x) { return x % 5 < 3; });
#if !_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN && !_PSTL_ICC_19_TEST_IS_PARTITIONED_RELEASE_BROKEN
#if !defined(_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN) && !defined(_PSTL_ICC_19_TEST_IS_PARTITIONED_RELEASE_BROKEN)
test<LocalWrapper<float64_t>>([](const LocalWrapper<float64_t>&) { return true; });
#endif

Expand Down
Loading

0 comments on commit 3b9a1bb

Please sign in to comment.