[NFC][pstl] Run clang-format on the sources, including the tests
authorLouis Dionne <ldionne@apple.com>
Thu, 18 Jul 2019 20:22:28 +0000 (20:22 +0000)
committerLouis Dionne <ldionne@apple.com>
Thu, 18 Jul 2019 20:22:28 +0000 (20:22 +0000)
llvm-svn: 366492

36 files changed:
pstl/include/pstl/internal/algorithm_impl.h
pstl/include/pstl/internal/pstl_config.h
pstl/test/pstl/version.pass.cpp
pstl/test/std/algorithms/alg.merge/inplace_merge.pass.cpp
pstl/test/std/algorithms/alg.merge/merge.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/generate.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/remove.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/remove_copy.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/replace.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/rotate.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/unique.pass.cpp
pstl/test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp
pstl/test/std/algorithms/alg.nonmodifying/adjacent_find.pass.cpp
pstl/test/std/algorithms/alg.nonmodifying/find.pass.cpp
pstl/test/std/algorithms/alg.nonmodifying/find_end.pass.cpp
pstl/test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp
pstl/test/std/algorithms/alg.nonmodifying/find_if.pass.cpp
pstl/test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp
pstl/test/std/algorithms/alg.nonmodifying/search_n.pass.cpp
pstl/test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp
pstl/test/std/algorithms/alg.sorting/partial_sort.pass.cpp
pstl/test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp
pstl/test/std/algorithms/alg.sorting/sort.pass.cpp
pstl/test/std/numerics/numeric.ops/adjacent_difference.pass.cpp
pstl/test/std/numerics/numeric.ops/scan.pass.cpp
pstl/test/std/numerics/numeric.ops/transform_reduce.pass.cpp
pstl/test/std/numerics/numeric.ops/transform_scan.pass.cpp
pstl/test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp
pstl/test/support/pstl_test_config.h

index a9bf29a..883f03d 100644 (file)
@@ -2181,11 +2181,11 @@ __pattern_partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first,
                     _ForwardIterator __j1 = __first + (__j - __d_first);
 
                 // 1. Copy elements from input to output
-#    if !_PSTL_ICC_18_OMP_SIMD_BROKEN
+#if !_PSTL_ICC_18_OMP_SIMD_BROKEN
                     __internal::__brick_copy(__i1, __j1, __i, __is_vector);
-#    else
+#else
                     std::copy(__i1, __j1, __i);
-#    endif
+#endif
                     // 2. Sort elements in output sequence
                     std::sort(__i, __j, __comp);
                 },
index 31dd47a..ba96491 100644 (file)
@@ -52,7 +52,8 @@
 #endif
 
 // Enable SIMD for compilers that support OpenMP 4.0
-#if (_OPENMP >= 201307) || (__INTEL_COMPILER >= 1600) || (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) || defined(__clang__)
+#if (_OPENMP >= 201307) || (__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)
 #    define _PSTL_PRAGMA_SIMD_REDUCTION(PRM) _PSTL_PRAGMA(omp simd reduction(PRM))
index 84210de..7e34c1f 100644 (file)
@@ -8,12 +8,13 @@
 
 #include <pstl/internal/pstl_config.h>
 
-
 static_assert(_PSTL_VERSION == 10000);
 static_assert(_PSTL_VERSION_MAJOR == 10);
 static_assert(_PSTL_VERSION_MINOR == 00);
 static_assert(_PSTL_VERSION_PATCH == 0);
 
-int main() {
+int
+main()
+{
     return 0;
 }
index 64433c8..74ecc0c 100644 (file)
@@ -20,7 +20,7 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename BiDirIt1, typename Size, typename Generator1, typename Generator2, typename Compare>
     void
@@ -60,8 +60,7 @@ struct test_one_policy
     template <typename Policy, typename BiDirIt1, typename Size, typename Generator1, typename Generator2,
               typename Compare>
     typename std::enable_if<is_same_iterator_category<BiDirIt1, std::forward_iterator_tag>::value, void>::type
-    operator()(Policy&&, BiDirIt1, BiDirIt1, BiDirIt1, BiDirIt1, Size, Size,
-               Generator1, Generator2, Compare)
+    operator()(Policy&&, BiDirIt1, BiDirIt1, BiDirIt1, BiDirIt1, Size, Size, Generator1, Generator2, Compare)
     {
     }
 };
index 56b557c..d238103 100644 (file)
@@ -48,8 +48,7 @@ struct test_merge
     void
     operator()(Policy&& exec, std::reverse_iterator<InputIterator1> first1, std::reverse_iterator<InputIterator1> last1,
                std::reverse_iterator<InputIterator2> first2, std::reverse_iterator<InputIterator2> last2,
-               std::reverse_iterator<OutputIterator> out_first, std::reverse_iterator<OutputIterator> out_last,
-               Compare)
+               std::reverse_iterator<OutputIterator> out_first, std::reverse_iterator<OutputIterator> out_last, Compare)
     {
         using namespace std;
         typedef typename std::iterator_traits<std::reverse_iterator<InputIterator1>>::value_type T;
index 62eb7f6..aeafb02 100644 (file)
@@ -44,8 +44,8 @@ struct run_copy_if
               typename Predicate, typename T>
     void
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n,
-               Predicate pred, T trash)
+               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n, Predicate pred,
+               T trash)
     {
         // Cleaning
         std::fill_n(expected_first, n, trash);
index 57d7830..c376f89 100644 (file)
@@ -57,14 +57,14 @@ is_equal(Iterator first, Iterator last, Iterator d_first)
 
 template <typename Iterator>
 typename std::enable_if<!std::is_trivial<typename std::iterator_traits<Iterator>::value_type>::value, bool>::type
-is_equal(Iterator, Iterator, Iterator)
+    is_equal(Iterator, Iterator, Iterator)
 {
     return true;
 }
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
     _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN //dummy specializations to skip testing in case of broken configuration
     template <typename BiDirIt, typename Size, typename UnaryOp, typename Generator>
     void
@@ -97,8 +97,8 @@ struct test_one_policy
 
     template <typename Policy, typename BiDirIt, typename Size, typename UnaryOp, typename Generator>
     typename std::enable_if<!is_same_iterator_category<BiDirIt, std::forward_iterator_tag>::value, void>::type
-    operator()(Policy&& exec, BiDirIt first, BiDirIt last, BiDirIt exp_first, BiDirIt exp_last, Size,
-               UnaryOp unary_op, Generator generator)
+    operator()(Policy&& exec, BiDirIt first, BiDirIt last, BiDirIt exp_first, BiDirIt exp_last, Size, UnaryOp unary_op,
+               Generator generator)
     {
         // partition
         {
@@ -121,8 +121,7 @@ struct test_one_policy
     }
     template <typename Policy, typename BiDirIt, typename Size, typename UnaryOp, typename Generator>
     typename std::enable_if<is_same_iterator_category<BiDirIt, std::forward_iterator_tag>::value, void>::type
-    operator()(Policy&&, BiDirIt, BiDirIt, BiDirIt, BiDirIt, Size,
-               UnaryOp, Generator)
+    operator()(Policy&&, BiDirIt, BiDirIt, BiDirIt, BiDirIt, Size, UnaryOp, Generator)
     {
     }
 };
index a9dbdf0..ab51504 100644 (file)
@@ -21,7 +21,7 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN || _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||     \
+#if _PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN || _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
     template <typename Iterator1, typename Iterator2>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
index 668f970..8c79de7 100644 (file)
@@ -61,7 +61,7 @@ struct test_one_policy
     Iterator data_e;
     test_one_policy(Iterator b, Iterator e) : data_b(b), data_e(e) {}
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator1>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
index 8aa616e..5bef48e 100644 (file)
@@ -22,7 +22,7 @@ using namespace TestUtils;
 struct run_copy
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size, typename T>
     void
@@ -45,8 +45,7 @@ struct run_copy
               typename T>
     void
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size size,
-               Size n, T trash)
+               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size size, Size n, T trash)
     {
         // Cleaning
         std::fill_n(expected_first, size, trash);
@@ -75,7 +74,7 @@ template <typename T>
 struct run_move
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size>
     void
@@ -97,8 +96,7 @@ struct run_move
     template <typename Policy, typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size>
     void
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size size,
-               Size, T trash)
+               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size size, Size, T trash)
     {
         // Cleaning
         std::fill_n(expected_first, size, trash);
@@ -118,7 +116,7 @@ template <typename T>
 struct run_move<Wrapper<T>>
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size>
     void
@@ -140,8 +138,7 @@ struct run_move<Wrapper<T>>
     template <typename Policy, typename InputIterator, typename OutputIterator, typename OutputIterator2, typename Size>
     void
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator2, OutputIterator2, Size size,
-               Size, Wrapper<T> trash)
+               OutputIterator out_last, OutputIterator2, OutputIterator2, Size size, Size, Wrapper<T> trash)
     {
         // Cleaning
         std::fill_n(out_first, size, trash);
index d3375ec..4561f3c 100644 (file)
@@ -58,8 +58,7 @@ struct test_generate
             const auto m = n / 2;
             auto actual_last = generate_n(exec, first, m, g);
             Size count = std::count(first, actual_last, g.default_value());
-            EXPECT_TRUE(count == m && actual_last == std::next(first, m),
-                        "generate_n wrong result for generate_n");
+            EXPECT_TRUE(count == m && actual_last == std::next(first, m), "generate_n wrong result for generate_n");
             std::fill(first, actual_last, T(0));
         }
     }
index c01b8e2..cb8b178 100644 (file)
@@ -21,7 +21,7 @@ using namespace TestUtils;
 
 struct run_remove
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename InputIterator, typename OutputIterator, typename Size, typename T>
     void
@@ -59,7 +59,7 @@ struct run_remove
 
 struct run_remove_if
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename InputIterator, typename OutputIterator, typename Size, typename Predicate>
     void
index 9b47cca..969343b 100644 (file)
@@ -24,8 +24,8 @@ struct run_remove_copy
               typename T>
     void
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n,
-               const T& value, T trash)
+               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n, const T& value,
+               T trash)
     {
         // Cleaning
         std::fill_n(expected_first, n, trash);
index 963ff12..d42dae7 100644 (file)
@@ -23,7 +23,7 @@ struct copy_int
 {
     int32_t value;
     int32_t copied_times = 0;
-    constexpr explicit copy_int(int32_t val = 0) : value(val) { }
+    constexpr explicit copy_int(int32_t val = 0) : value(val) {}
 
     constexpr copy_int&
     operator=(const copy_int& other)
@@ -82,8 +82,7 @@ struct test_one_policy
     }
 
     template <typename T, typename Iterator1>
-    bool
-    check(Iterator1, Iterator1)
+    bool check(Iterator1, Iterator1)
     {
         return true;
     }
index a2e4f72..4414d1c 100644 (file)
@@ -26,8 +26,8 @@ struct test_replace_copy
               typename Predicate, typename T>
     void
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n,
-               Predicate pred, const T& old_value, const T& new_value, T trash)
+               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n, Predicate pred,
+               const T& old_value, const T& new_value, T trash)
     {
         // Cleaning
         std::fill_n(expected_first, n, trash);
index a5c0bc2..5eb242e 100644 (file)
@@ -74,7 +74,7 @@ struct compare<wrapper<T>>
 struct test_one_policy
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                             \
     _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // dummy specializations to skip testing in case of broken configuration
     template <typename Iterator, typename Size>
     void
index 0706c9c..3749492 100644 (file)
@@ -69,7 +69,7 @@ struct comparator
 struct test_one_policy
 {
 
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator1, typename Iterator2>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
index 7ef5d91..79f5518 100644 (file)
@@ -21,7 +21,7 @@ using namespace TestUtils;
 
 struct run_unique
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename ForwardIt, typename Generator>
     void
index f55209f..b1590ef 100644 (file)
@@ -45,8 +45,8 @@ struct run_unique_copy
               typename Predicate, typename T>
     void
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n,
-               Predicate pred, T trash)
+               OutputIterator out_last, OutputIterator2 expected_first, OutputIterator2, Size n, Predicate pred,
+               T trash)
     {
         // Cleaning
         std::fill_n(expected_first, n, trash);
@@ -124,8 +124,8 @@ main()
     test<float32_t>(float32_t(42), std::equal_to<float32_t>(),
                     [](int32_t j) { return float32_t(5 * j / 23 ^ (j / 7)); });
 #if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN
-    test<float32_t>(float32_t(42), [](float32_t, float32_t) { return false; },
-                    [](int32_t j) { return float32_t(j); }, false);
+    test<float32_t>(float32_t(42), [](float32_t, float32_t) { return false; }, [](int32_t j) { return float32_t(j); },
+                    false);
 #endif
 
     test_algo_basic_double<int32_t>(run_for_rnd_fw<test_non_const<int32_t>>());
index d9c983a..8f00351 100644 (file)
@@ -47,7 +47,7 @@ test_adjacent_find_by_type()
         for (size_t e = 0; e < (counts[c] >= 64 ? 64 : (counts[c] == 2 ? 1 : 2)); ++e)
         {
             Sequence<T> in(counts[c], [](size_t v) -> T { return T(v); }); //fill 0...n
-            in[e] = in[e + 1] = -1;                                         //make an adjacent pair
+            in[e] = in[e + 1] = -1;                                        //make an adjacent pair
 
             auto i = std::adjacent_find(in.cbegin(), in.cend(), std::equal_to<T>());
             EXPECT_TRUE(i == in.cbegin() + e, "std::adjacent_find returned wrong result");
index d6bcadb..f5a5d94 100644 (file)
@@ -21,7 +21,7 @@ using namespace TestUtils;
 
 struct test_find
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator, typename Value>
     void
@@ -85,7 +85,7 @@ main()
 {
     // Note that the "hit" and "miss" functions here avoid overflow issues.
     test<Number>(Weird(42, OddTag()), [](int32_t) { return Number(42, OddTag()); }, // hit
-                 [](int32_t j) { return Number(j == 42 ? 0 : j, OddTag()); });        // miss
+                 [](int32_t j) { return Number(j == 42 ? 0 : j, OddTag()); });      // miss
 
     // Test with value that is equal to two different bit patterns (-0.0 and 0.0)
     test<float32_t>(-0.0, [](int32_t j) { return j & 1 ? 0.0 : -0.0; }, // hit
index b6a60f0..20826ae 100644 (file)
@@ -20,7 +20,7 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator1, typename Iterator2, typename Predicate>
     void
index 7f5a556..84c35e9 100644 (file)
@@ -20,7 +20,7 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator1, typename Iterator2, typename Predicate>
     void
index 5bafbbc..3dd41c0 100644 (file)
@@ -21,7 +21,7 @@ using namespace TestUtils;
 
 struct test_find_if
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator, typename Predicate, typename NotPredicate>
     void
index 49cf28b..71009ac 100644 (file)
@@ -68,7 +68,7 @@ is_equal(const T& x, const T& y)
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator1, typename Size, typename Generator1, typename Generator2, typename Compare>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
@@ -113,8 +113,7 @@ struct test_one_policy
     template <typename Policy, typename Iterator1, typename Size, typename Generator1, typename Generator2,
               typename Compare>
     typename std::enable_if<!is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
-    operator()(Policy&&, Iterator1, Iterator1, Iterator1, Iterator1, Size, Size,
-               Generator1, Generator2, Compare)
+    operator()(Policy&&, Iterator1, Iterator1, Iterator1, Iterator1, Size, Size, Generator1, Generator2, Compare)
     {
     }
 };
index a42193a..9bcea24 100644 (file)
@@ -20,7 +20,7 @@ using namespace TestUtils;
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator, typename Size, typename T, typename Predicate>
     void
index 6dc8bb6..78e7a30 100644 (file)
@@ -35,7 +35,7 @@ struct WithCmpOp
 
 struct test_is_heap
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator, typename Predicate>
     typename std::enable_if<is_same_iterator_category<Iterator, std::random_access_iterator_tag>::value, void>::type
index b1cd669..e378cb4 100644 (file)
@@ -81,11 +81,11 @@ struct test_brick_partial_sort
             if (m1 - first > 1)
             {
 #ifdef _DEBUG
-#   if defined(_PSTL_PAR_BACKEND_TBB)
+#    if defined(_PSTL_PAR_BACKEND_TBB)
                 auto p = tbb::this_task_arena::max_concurrency();
-#   else
+#    else
                 auto p = 1;
-#   endif
+#    endif
                 auto complex = std::ceil(n * std::log(float32_t(m1 - first)));
                 if (count_comp > complex * p)
                 {
@@ -99,8 +99,7 @@ struct test_brick_partial_sort
     template <typename Policy, typename InputIterator, typename Compare>
     typename std::enable_if<!is_same_iterator_category<InputIterator, std::random_access_iterator_tag>::value,
                             void>::type
-    operator()(Policy&&, InputIterator, InputIterator, InputIterator, InputIterator,
-               Compare)
+    operator()(Policy&&, InputIterator, InputIterator, InputIterator, InputIterator, Compare)
     {
     }
 };
index 55b1d04..3fe1d5a 100644 (file)
@@ -55,7 +55,7 @@ struct test_one_policy
         : d_first(b1), d_last(e1), exp_first(b2), exp_last(e2)
     {
     }
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename InputIterator, typename Size, typename T, typename Compare>
     void
index 7280dfb..add69d6 100644 (file)
@@ -189,8 +189,8 @@ struct test_sort_with_compare
               typename Compare>
     typename std::enable_if<!is_same_iterator_category<InputIterator, std::random_access_iterator_tag>::value,
                             void>::type
-    operator()(Policy&&, OutputIterator, OutputIterator, OutputIterator2,
-               OutputIterator2, InputIterator, InputIterator, Size, Compare)
+    operator()(Policy&&, OutputIterator, OutputIterator, OutputIterator2, OutputIterator2, InputIterator, InputIterator,
+               Size, Compare)
     {
     }
 };
index d77f2c1..6525155 100644 (file)
@@ -86,15 +86,15 @@ compute_and_check(Iterator1 first, Iterator1 last, Iterator2 d_first, T, Functio
 // we don't want to check equality here
 // because we can't be sure it will be strictly equal for floating point types
 template <typename Iterator1, typename Iterator2, typename T, typename Function>
-typename std::enable_if<std::is_floating_point<T>::value, bool>::type
-compute_and_check(Iterator1, Iterator1, Iterator2, T, Function)
+typename std::enable_if<std::is_floating_point<T>::value, bool>::type compute_and_check(Iterator1, Iterator1, Iterator2,
+                                                                                        T, Function)
 {
     return true;
 }
 
 struct test_one_policy
 {
-#if _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN ||                                                            \
+#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
     template <typename Iterator1, typename Iterator2, typename T, typename Function>
     typename std::enable_if<is_same_iterator_category<Iterator1, std::random_access_iterator_tag>::value, void>::type
index 4b422dc..64156f0 100644 (file)
@@ -156,8 +156,7 @@ struct test_scan_with_binary_op
     template <typename Policy, typename Iterator1, typename Iterator2, typename Iterator3, typename Size, typename T,
               typename BinaryOp>
     typename std::enable_if<TestUtils::isReverse<Iterator1>::value, void>::type
-    operator()(Policy&&, Iterator1, Iterator1, Iterator2, Iterator2,
-               Iterator3, Iterator3, Size, T, BinaryOp, T)
+    operator()(Policy&&, Iterator1, Iterator1, Iterator2, Iterator2, Iterator3, Iterator3, Size, T, BinaryOp, T)
     {
     }
 };
index c4317c4..7341ed5 100644 (file)
@@ -124,10 +124,9 @@ main()
     test_by_type<int64_t>(0, [](const int64_t& a, const int64_t& b) -> int64_t { return a | b; }, XOR(),
                           [](const int64_t& x) -> int64_t { return x * 2; },
                           [](std::size_t) -> int64_t { return int64_t(rand() % 1000); });
-    test_by_type<float32_t>(1.0f, std::multiplies<float32_t>(),
-                            [](const float32_t& a, const float32_t& b) -> float32_t { return a + b; },
-                            [](const float32_t& x) -> float32_t { return x + 2; },
-                            [](std::size_t) -> float32_t { return rand() % 1000; });
+    test_by_type<float32_t>(
+        1.0f, std::multiplies<float32_t>(), [](const float32_t& a, const float32_t& b) -> float32_t { return a + b; },
+        [](const float32_t& x) -> float32_t { return x + 2; }, [](std::size_t) -> float32_t { return rand() % 1000; });
     test_by_type<MyClass>(MyClass(), std::plus<MyClass>(), std::multiplies<MyClass>(), std::negate<MyClass>(),
                           [](std::size_t) -> MyClass { return MyClass(rand() % 1000); });
 
index c9475c9..a7dd44a 100644 (file)
@@ -39,15 +39,15 @@ struct test_transform_scan
               typename T, typename BinaryOp>
     typename std::enable_if<!TestUtils::isReverse<InputIterator>::value, void>::type
     operator()(Policy&& exec, InputIterator first, InputIterator last, OutputIterator out_first,
-               OutputIterator out_last, OutputIterator expected_first, OutputIterator, Size n,
-               UnaryOp unary_op, T init, BinaryOp binary_op, T trash)
+               OutputIterator out_last, OutputIterator expected_first, OutputIterator, Size n, UnaryOp unary_op, T init,
+               BinaryOp binary_op, T trash)
     {
         using namespace std;
 
-        auto orr1 = inclusive ? transform_inclusive_scan(std::execution::seq, first, last, expected_first, binary_op,
-                                                         unary_op, init)
-                              : transform_exclusive_scan(std::execution::seq, first, last, expected_first, init,
-                                                         binary_op, unary_op);
+        auto orr1 =
+            inclusive
+                ? transform_inclusive_scan(std::execution::seq, first, last, expected_first, binary_op, unary_op, init)
+                : transform_exclusive_scan(std::execution::seq, first, last, expected_first, init, binary_op, unary_op);
         auto orr2 = inclusive ? transform_inclusive_scan(exec, first, last, out_first, binary_op, unary_op, init)
                               : transform_exclusive_scan(exec, first, last, out_first, init, binary_op, unary_op);
         EXPECT_TRUE(out_last == orr2, "transform...scan returned wrong iterator");
@@ -66,9 +66,8 @@ struct test_transform_scan
     template <typename Policy, typename InputIterator, typename OutputIterator, typename Size, typename UnaryOp,
               typename T, typename BinaryOp>
     typename std::enable_if<TestUtils::isReverse<InputIterator>::value, void>::type
-    operator()(Policy&&, InputIterator, InputIterator, OutputIterator,
-               OutputIterator, OutputIterator, OutputIterator, Size,
-               UnaryOp, T, BinaryOp, T)
+    operator()(Policy&&, InputIterator, InputIterator, OutputIterator, OutputIterator, OutputIterator, OutputIterator,
+               Size, UnaryOp, T, BinaryOp, T)
     {
     }
 };
index cb7df78..d1c9e3a 100644 (file)
@@ -133,7 +133,7 @@ main()
     test_uninitialized_copy_move_by_type<float64_t>();
 
     // for user-defined types
-#if !_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN && !_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN &&   \
+#if !_PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN && !_PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN &&     \
     !_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN
     test_uninitialized_copy_move_by_type<Wrapper<int8_t>>();
 #endif
index 9220790..daf5625 100644 (file)
 #define _PSTL_TEST_config_H
 
 #if defined(_MSC_VER) && defined(_DEBUG)
-#define _SCL_SECURE_NO_WARNINGS //to prevent the compilation warning. Microsoft STL implementation has specific checking of an iterator range in DEBUG mode for the containers from the standard library.
+#    define _SCL_SECURE_NO_WARNINGS //to prevent the compilation warning. Microsoft STL implementation has specific checking of an iterator range in DEBUG mode for the containers from the standard library.
 #endif
 
 #ifndef __clang__
-#define _PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN                                                    \
-    (__x86_64 && !_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER <= 1700 && !__APPLE__)
-#define _PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN                                                                 \
-    (!_DEBUG && __INTEL_COMPILER &&                                                                                    \
-     (__INTEL_COMPILER < 1800 || (__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 1)))
-#define _PSTL_ICC_1800_TEST_MONOTONIC_RELEASE_64_BROKEN                                                               \
-    (__x86_64 && !_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 1)
-#define _PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN                                                                       \
-    (__i386__ && !_DEBUG && __INTEL_COMPILER >= 1700 && __INTEL_COMPILER < 1800 && __APPLE__)
-#define _PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN                                                            \
-    (!_DEBUG && __INTEL_COMPILER >= 1800 && __INTEL_COMPILER < 1900 && _MSC_VER == 1910)
-#define _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN                                                           \
-    (_M_IX86 && _DEBUG && __INTEL_COMPILER >= 1700 && __INTEL_COMPILER < 1800 && _MSC_VER >= 1900)
-#define _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN                                                            \
-    (_M_IX86 && _DEBUG && __INTEL_COMPILER >= 1600 && __INTEL_COMPILER < 1700 && _MSC_VER == 1900)
-#define _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN                                                           \
-    (((_M_X64 && _MSC_VER == 1900) || __x86_64) && !_DEBUG && __INTEL_COMPILER < 1700)
-#define _PSTL_ICC_16_17_TEST_64_TIMEOUT (__x86_64 && __INTEL_COMPILER && __INTEL_COMPILER < 1800 && !__APPLE__)
-#define _PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN (!_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER == 1800)
-#define _PSTL_CLANG_TEST_BIG_OBJ_DEBUG_32_BROKEN                                                                      \
-    (__i386__ && PSTL_USE_DEBUG && __clang__ && _PSTL_CLANG_VERSION <= 90000)
-#define _PSTL_ICC_16_17_18_TEST_UNIQUE_MASK_RELEASE_BROKEN                                                            \
-    (!_DEBUG && __INTEL_COMPILER &&                                                                                    \
-     (__INTEL_COMPILER < 1800 || (__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 3)))
-#define _PSTL_ICC_18_TEST_EARLY_EXIT_AVX_RELEASE_BROKEN                                                               \
-    (!_DEBUG && __INTEL_COMPILER == 1800 && __AVX__ && !__AVX2__ && !__AVX512__)
-#define _PSTL_ICC_19_TEST_IS_PARTITIONED_RELEASE_BROKEN                                                               \
-    (!PSTL_USE_DEBUG && (__linux__ || __APPLE__) && __INTEL_COMPILER == 1900)
-#define _PSTL_ICL_19_VC14_VC141_TEST_SCAN_RELEASE_BROKEN                                                              \
-    (__INTEL_COMPILER == 1900 && _MSC_VER >= 1900 && _MSC_VER <= 1910)
-#define _PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN (__INTEL_COMPILER == 1900 && _MSC_VER && !_DEBUG)
+#    define _PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN                                                 \
+        (__x86_64 && !_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER <= 1700 && !__APPLE__)
+#    define _PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN                                                              \
+        (!_DEBUG && __INTEL_COMPILER &&                                                                                \
+         (__INTEL_COMPILER < 1800 || (__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 1)))
+#    define _PSTL_ICC_1800_TEST_MONOTONIC_RELEASE_64_BROKEN                                                            \
+        (__x86_64 && !_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 1)
+#    define _PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN                                                                    \
+        (__i386__ && !_DEBUG && __INTEL_COMPILER >= 1700 && __INTEL_COMPILER < 1800 && __APPLE__)
+#    define _PSTL_ICC_18_VC141_TEST_SIMD_LAMBDA_RELEASE_BROKEN                                                         \
+        (!_DEBUG && __INTEL_COMPILER >= 1800 && __INTEL_COMPILER < 1900 && _MSC_VER == 1910)
+#    define _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN                                                        \
+        (_M_IX86 && _DEBUG && __INTEL_COMPILER >= 1700 && __INTEL_COMPILER < 1800 && _MSC_VER >= 1900)
+#    define _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN                                                         \
+        (_M_IX86 && _DEBUG && __INTEL_COMPILER >= 1600 && __INTEL_COMPILER < 1700 && _MSC_VER == 1900)
+#    define _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN                                                        \
+        (((_M_X64 && _MSC_VER == 1900) || __x86_64) && !_DEBUG && __INTEL_COMPILER < 1700)
+#    define _PSTL_ICC_16_17_TEST_64_TIMEOUT (__x86_64 && __INTEL_COMPILER && __INTEL_COMPILER < 1800 && !__APPLE__)
+#    define _PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN                                                      \
+        (!_DEBUG && __INTEL_COMPILER && __INTEL_COMPILER == 1800)
+#    define _PSTL_CLANG_TEST_BIG_OBJ_DEBUG_32_BROKEN                                                                   \
+        (__i386__ && PSTL_USE_DEBUG && __clang__ && _PSTL_CLANG_VERSION <= 90000)
+#    define _PSTL_ICC_16_17_18_TEST_UNIQUE_MASK_RELEASE_BROKEN                                                         \
+        (!_DEBUG && __INTEL_COMPILER &&                                                                                \
+         (__INTEL_COMPILER < 1800 || (__INTEL_COMPILER == 1800 && __INTEL_COMPILER_UPDATE < 3)))
+#    define _PSTL_ICC_18_TEST_EARLY_EXIT_AVX_RELEASE_BROKEN                                                            \
+        (!_DEBUG && __INTEL_COMPILER == 1800 && __AVX__ && !__AVX2__ && !__AVX512__)
+#    define _PSTL_ICC_19_TEST_IS_PARTITIONED_RELEASE_BROKEN                                                            \
+        (!PSTL_USE_DEBUG && (__linux__ || __APPLE__) && __INTEL_COMPILER == 1900)
+#    define _PSTL_ICL_19_VC14_VC141_TEST_SCAN_RELEASE_BROKEN                                                           \
+        (__INTEL_COMPILER == 1900 && _MSC_VER >= 1900 && _MSC_VER <= 1910)
+#    define _PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN (__INTEL_COMPILER == 1900 && _MSC_VER && !_DEBUG)
 #endif // !__clang__
 
 #endif /* _PSTL_TEST_config_H */