Index: include/pstl/algorithm =================================================================== --- include/pstl/algorithm +++ include/pstl/algorithm @@ -7,18 +7,18 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_algorithm -#define __PSTL_algorithm +#ifndef _PSTL_ALGORITHM +#define _PSTL_ALGORITHM #include "internal/pstl_config.h" -#if __PSTL_EXECUTION_POLICIES_DEFINED +#if _PSTL_EXECUTION_POLICIES_DEFINED // If has already been included, pull in implementations # include "internal/glue_algorithm_impl.h" #else // Otherwise just pull in forward declarations # include "internal/glue_algorithm_defs.h" -# define __PSTL_ALGORITHM_FORWARD_DECLARED 1 +# define _PSTL_ALGORITHM_FORWARD_DECLARED 1 #endif -#endif /* __PSTL_algorithm */ +#endif /* _PSTL_ALGORITHM */ Index: include/pstl/execution =================================================================== --- include/pstl/execution +++ include/pstl/execution @@ -7,31 +7,31 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_execution -#define __PSTL_execution +#ifndef _PSTL_EXECUTION +#define _PSTL_EXECUTION #include "internal/pstl_config.h" #include "internal/execution_defs.h" -#define __PSTL_EXECUTION_POLICIES_DEFINED 1 +#define _PSTL_EXECUTION_POLICIES_DEFINED 1 -#if __PSTL_ALGORITHM_FORWARD_DECLARED +#if _PSTL_ALGORITHM_FORWARD_DECLARED # include "internal/glue_algorithm_impl.h" #endif -#if __PSTL_MEMORY_FORWARD_DECLARED +#if _PSTL_MEMORY_FORWARD_DECLARED # include "internal/glue_memory_impl.h" #endif -#if __PSTL_NUMERIC_FORWARD_DECLARED +#if _PSTL_NUMERIC_FORWARD_DECLARED # include "internal/glue_numeric_impl.h" #endif -#if __PSTL_CPP17_EXECUTION_POLICIES_PRESENT -__PSTL_PRAGMA_MESSAGE_POLICIES("The execution policies are defined in the namespace __pstl::execution") +#if _PSTL_CPP17_EXECUTION_POLICIES_PRESENT +_PSTL_PRAGMA_MESSAGE_POLICIES("The execution policies are defined in the namespace __pstl::execution") #else # include "internal/glue_execution_defs.h" -__PSTL_PRAGMA_MESSAGE_POLICIES( +_PSTL_PRAGMA_MESSAGE_POLICIES( "The execution policies are injected into the standard namespace std::execution") #endif @@ -43,6 +43,6 @@ { using namespace __pstl::execution; } -} +} // namespace pstl -#endif /* __PSTL_execution */ +#endif /* _PSTL_EXECUTION */ Index: include/pstl/internal/algorithm_fwd.h =================================================================== --- include/pstl/internal/algorithm_fwd.h +++ include/pstl/internal/algorithm_fwd.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_algorithm_fwd_H -#define __PSTL_algorithm_fwd_H +#ifndef _PSTL_ALGORITHM_FWD_H +#define _PSTL_ALGORITHM_FWD_H #include #include @@ -37,7 +37,7 @@ __pattern_any_of(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Pred, _IsVector, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_any_of(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Pred, _IsVector, @@ -63,7 +63,7 @@ __pattern_walk1(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Function, _IsVector, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_walk1(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Function, _IsVector, @@ -75,7 +75,7 @@ __pattern_walk_brick(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Brick, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_walk_brick(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Brick, @@ -99,7 +99,7 @@ __pattern_walk1_n(_ExecutionPolicy&&, _ForwardIterator, _Size, _Function, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_walk1_n(_ExecutionPolicy&&, _RandomAccessIterator, _Size, _Function, _IsVector, @@ -111,7 +111,7 @@ __pattern_walk_brick_n(_ExecutionPolicy&&, _ForwardIterator, _Size, _Brick, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_walk_brick_n(_ExecutionPolicy&&, _RandomAccessIterator, _Size, _Brick, @@ -145,7 +145,7 @@ __pattern_walk2(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function, _IsVector, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator2 __pattern_walk2(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Function, _IsVector, @@ -158,7 +158,7 @@ __pattern_walk2_n(_ExecutionPolicy&&, _ForwardIterator1, _Size, _ForwardIterator2, _Function, _IsVector, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator2 @@ -171,7 +171,7 @@ __pattern_walk2_brick(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _Brick, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator2 __pattern_walk2_brick(_ExecutionPolicy&&, _RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, @@ -184,7 +184,7 @@ __pattern_walk2_brick_n(_ExecutionPolicy&&, _ForwardIterator1, _Size, _ForwardIterator2, _Brick, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator2 __pattern_walk2_brick_n(_ExecutionPolicy&&, _RandomAccessIterator1, _Size, _RandomAccessIterator2, _Brick, @@ -213,7 +213,7 @@ _Function, _IsVector, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator3 @@ -239,7 +239,7 @@ __pattern_equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _BinaryPredicate, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool @@ -261,7 +261,7 @@ __pattern_equal(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool @@ -286,7 +286,7 @@ __pattern_find_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_find_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, _IsVector, @@ -314,7 +314,7 @@ _BinaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator1 @@ -343,7 +343,7 @@ __pattern_find_first_of(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _BinaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator1 @@ -372,7 +372,7 @@ _BinaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator1 @@ -402,7 +402,7 @@ IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator @@ -506,7 +506,7 @@ __pattern_copy_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _UnaryPredicate, _IsVector, /*parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -533,7 +533,7 @@ __pattern_count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, /* is_parallel */ std::false_type, _IsVector) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template typename std::iterator_traits<_ForwardIterator>::difference_type __pattern_count(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Predicate, @@ -557,7 +557,7 @@ __pattern_unique(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_unique(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate, _IsVector, @@ -592,7 +592,7 @@ __brick_calc_mask_2(_RandomAccessIterator, _RandomAccessIterator, bool* __restrict, _BinaryPredicate, /*vector=*/std::true_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -625,7 +625,7 @@ __pattern_reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_reverse(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _IsVector, @@ -649,7 +649,7 @@ __pattern_reverse_copy(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _OutputIterator, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator __pattern_reverse_copy(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _OutputIterator, _IsVector, @@ -673,7 +673,7 @@ __pattern_rotate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_rotate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _IsVector, @@ -698,7 +698,7 @@ _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator __pattern_rotate_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator, @@ -723,7 +723,7 @@ __pattern_is_partitioned(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_is_partitioned(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector, @@ -747,7 +747,7 @@ __pattern_partition(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_partition(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector, @@ -772,7 +772,7 @@ _IsVector, /*is_parallelization=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _BidirectionalIterator __pattern_stable_partition(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _UnaryPredicate, @@ -801,7 +801,7 @@ _UnaryPredicate, _IsVector, /*is_parallelization=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template std::pair<_OutputIterator1, _OutputIterator2> @@ -820,7 +820,7 @@ __pattern_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/, /*is_parallel=*/std::false_type, _IsMoveConstructible) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector /*is_vector*/, @@ -838,7 +838,7 @@ _IsVector /*is_vector*/, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_stable_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, @@ -856,7 +856,7 @@ _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_partial_sort(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, @@ -874,7 +874,7 @@ _RandomAccessIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_partial_sort_copy(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _RandomAccessIterator, @@ -901,7 +901,7 @@ __pattern_adjacent_find(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _BinaryPredicate, /* is_parallel */ std::false_type, _IsVector, bool) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_adjacent_find(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _BinaryPredicate, @@ -917,7 +917,7 @@ _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_nth_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare, @@ -943,7 +943,7 @@ __pattern_fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&, /*is_parallel=*/std::false_type, _IsVector) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&, @@ -965,7 +965,7 @@ __pattern_fill_n(_ExecutionPolicy&&, _OutputIterator, _Size, const _Tp&, /*is_parallel=*/std::false_type, _IsVector) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator __pattern_fill_n(_ExecutionPolicy&&, _OutputIterator, _Size, const _Tp&, @@ -989,7 +989,7 @@ __pattern_generate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Generator, /*is_parallel=*/std::false_type, _IsVector) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_generate(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Generator, @@ -1009,7 +1009,7 @@ __pattern_generate_n(_ExecutionPolicy&&, OutputIterator, Size, _Generator, /*is_parallel=*/std::false_type, _IsVector) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template OutputIterator __pattern_generate_n(_ExecutionPolicy&&, OutputIterator, Size, _Generator, @@ -1032,7 +1032,7 @@ __pattern_remove_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector, /*is_parallel*/ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_remove_if(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _UnaryPredicate, _IsVector, @@ -1059,7 +1059,7 @@ __pattern_merge(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _OutputIterator, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -1086,7 +1086,7 @@ _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_inplace_merge(_ExecutionPolicy&&, _BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, @@ -1104,7 +1104,7 @@ _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_includes(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, @@ -1132,7 +1132,7 @@ __pattern_set_union(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -1161,7 +1161,7 @@ _ForwardIterator2, _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -1189,7 +1189,7 @@ __pattern_set_difference(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -1218,7 +1218,7 @@ _ForwardIterator2, _OutputIterator, _Compare, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -1244,7 +1244,7 @@ __pattern_is_heap_until(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_is_heap_until(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector, @@ -1268,7 +1268,7 @@ __pattern_min_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_min_element(_ExecutionPolicy&&, _RandomAccessIterator, _RandomAccessIterator, _Compare, _IsVector, @@ -1292,7 +1292,7 @@ __pattern_minmax_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template std::pair<_ForwardIterator, _ForwardIterator> __pattern_minmax_element(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _Compare, _IsVector, @@ -1319,7 +1319,7 @@ _Predicate, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template std::pair<_RandomAccessIterator1, _RandomAccessIterator2> @@ -1346,7 +1346,7 @@ __pattern_lexicographical_compare(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, _ForwardIterator2, _Compare, _IsVector, /* is_parallel = */ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_lexicographical_compare(_ExecutionPolicy&&, _ForwardIterator1, _ForwardIterator1, _ForwardIterator2, @@ -1355,4 +1355,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_algorithm_fwd_H */ +#endif /* _PSTL_ALGORITHM_FWD_H */ Index: include/pstl/internal/algorithm_impl.h =================================================================== --- include/pstl/internal/algorithm_impl.h +++ include/pstl/internal/algorithm_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_algorithm_impl_H -#define __PSTL_algorithm_impl_H +#ifndef _PSTL_ALGORITHM_IMPL_H +#define _PSTL_ALGORITHM_IMPL_H #include #include @@ -21,7 +21,7 @@ #include "parallel_backend_utils.h" #include "unseq_backend_simd.h" -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES # include "parallel_backend.h" # include "parallel_impl.h" #endif @@ -59,7 +59,7 @@ return __internal::__brick_any_of(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_any_of(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Pred __pred, @@ -115,7 +115,7 @@ __internal::__brick_walk1(__first, __last, __f, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_walk1(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Function __f, @@ -139,7 +139,7 @@ __brick(__first, __last); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_walk_brick(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Brick __brick, @@ -179,7 +179,7 @@ return __internal::__brick_walk1_n(__first, __n, __f, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_walk1_n(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _Size __n, _Function __f, @@ -200,7 +200,7 @@ return __brick(__first, __n); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_walk_brick_n(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _Size __n, _Brick __brick, @@ -264,7 +264,7 @@ return __internal::__brick_walk2(__first1, __last1, __first2, __f, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator2 __pattern_walk2(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, @@ -308,7 +308,7 @@ return __brick(__first1, __last1, __first2); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator2 __pattern_walk2_brick(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _RandomAccessIterator1 __last1, @@ -325,7 +325,7 @@ } #endif -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator2 __pattern_walk2_brick_n(_ExecutionPolicy&& __exec, _RandomAccessIterator1 __first1, _Size __n, @@ -382,7 +382,7 @@ return __internal::__brick_walk3(__first1, __last1, __first2, __first3, __f, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator3 @@ -437,7 +437,7 @@ return __internal::__brick_equal(__first1, __last1, __first2, __last2, __p, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool @@ -489,7 +489,7 @@ return __internal::__brick_equal(__first1, __last1, __first2, __p, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool @@ -538,7 +538,7 @@ return __internal::__brick_find_if(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_find_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, @@ -681,7 +681,7 @@ return __internal::__brick_find_end(__first, __last, __s_first, __s_last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator1 @@ -739,7 +739,7 @@ return __internal::__brick_find_first_of(__first, __last, __s_first, __s_last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator1 @@ -787,7 +787,7 @@ return __internal::__brick_search(__first, __last, __s_first, __s_last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator1 @@ -846,7 +846,7 @@ return __internal::__brick_search_n(__first, __last, __count, __value, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator @@ -974,7 +974,7 @@ __brick_copy_if(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, _UnaryPredicate __pred, /*vector=*/std::true_type) noexcept { -#if (__PSTL_MONOTONIC_PRESENT) +#if (_PSTL_MONOTONIC_PRESENT) return __unseq_backend::__simd_copy_if(__first, __last - __first, __result, __pred); #else return std::copy_if(__first, __last, __result, __pred); @@ -1033,7 +1033,7 @@ __brick_copy_by_mask(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator __result, bool* __restrict __mask, _Assigner __assigner, /*vector=*/std::true_type) noexcept { -#if (__PSTL_MONOTONIC_PRESENT) +#if (_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()); @@ -1065,7 +1065,7 @@ __brick_partition_by_mask(_RandomAccessIterator __first, _RandomAccessIterator __last, _OutputIterator1 __out_true, _OutputIterator2 __out_false, bool* __mask, /*vector=*/std::true_type) noexcept { -#if (__PSTL_MONOTONIC_PRESENT) +#if (_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()); @@ -1080,7 +1080,7 @@ return __internal::__brick_copy_if(__first, __last, __result, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -1144,7 +1144,7 @@ return __internal::__brick_count(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template typename std::iterator_traits<_ForwardIterator>::difference_type __pattern_count(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Predicate __pred, @@ -1179,7 +1179,7 @@ __brick_unique(_ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred, /*is_vector=*/std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::unique(__first, __last, __pred); } @@ -1191,7 +1191,7 @@ return __internal::__brick_unique(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES // That function is shared between two algorithms - remove_if (__pattern_remove_if) and unique (pattern unique). But a mask calculation is different. // So, a caller passes _CalcMask brick into remove_elements. template @@ -1272,7 +1272,7 @@ } #endif -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_unique(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _BinaryPredicate __pred, @@ -1317,7 +1317,7 @@ __brick_unique_copy(_RandomAccessIterator __first, _RandomAccessIterator __last, OutputIterator __result, _BinaryPredicate __pred, /*vector=*/std::true_type) noexcept { -#if (__PSTL_MONOTONIC_PRESENT) +#if (_PSTL_MONOTONIC_PRESENT) return __unseq_backend::__simd_unique_copy(__first, __last - __first, __result, __pred); #else return std::unique_copy(__first, __last, __result, __pred); @@ -1355,7 +1355,7 @@ return __unseq_backend::__simd_calc_mask_2(__first, __last - __first, __mask, __pred); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -1468,7 +1468,7 @@ __internal::__brick_reverse(__first, __last, _is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_reverse(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, @@ -1514,7 +1514,7 @@ return __internal::__brick_reverse_copy(__first, __last, __d_first, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator __pattern_reverse_copy(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, @@ -1540,7 +1540,7 @@ __brick_rotate(_ForwardIterator __first, _ForwardIterator __middle, _ForwardIterator __last, /*is_vector=*/std::false_type) noexcept { -#if __PSTL_CPP11_STD_ROTATE_BROKEN +#if _PSTL_CPP11_STD_ROTATE_BROKEN std::rotate(__first, __middle, __last); return std::next(__first, std::distance(__middle, __last)); #else @@ -1597,7 +1597,7 @@ return __internal::__brick_rotate(__first, __middle, __last, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_rotate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, @@ -1690,7 +1690,7 @@ return __internal::__brick_rotate_copy(__first, __middle, __last, __result, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator __pattern_rotate_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __middle, @@ -1769,7 +1769,7 @@ return __internal::__brick_is_partitioned(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_is_partitioned(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, @@ -1885,7 +1885,7 @@ __brick_partition(_ForwardIterator __first, _ForwardIterator __last, _UnaryPredicate __pred, /*is_vector=*/std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::partition(__first, __last, __pred); } @@ -1897,7 +1897,7 @@ return __internal::__brick_partition(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_partition(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, @@ -1984,7 +1984,7 @@ __brick_stable_partition(_BidirectionalIterator __first, _BidirectionalIterator __last, _UnaryPredicate __pred, /*__is_vector=*/std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::stable_partition(__first, __last, __pred); } @@ -1997,7 +1997,7 @@ return __internal::__brick_stable_partition(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _BidirectionalIterator __pattern_stable_partition(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __last, @@ -2068,7 +2068,7 @@ __brick_partition_copy(_ForwardIterator __first, _ForwardIterator __last, _OutputIterator1 __out_true, _OutputIterator2 __out_false, _UnaryPredicate __pred, /*is_vector=*/std::true_type) noexcept { -#if (__PSTL_MONOTONIC_PRESENT) +#if (_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); @@ -2085,7 +2085,7 @@ return __internal::__brick_partition_copy(__first, __last, __out_true, __out_false, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template std::pair<_OutputIterator1, _OutputIterator2> @@ -2139,7 +2139,7 @@ std::sort(__first, __last, __comp); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, _Compare __comp, @@ -2166,7 +2166,7 @@ std::stable_sort(__first, __last, __comp); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_stable_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, @@ -2193,7 +2193,7 @@ std::partial_sort(__first, __middle, __last, __comp); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_partial_sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __middle, @@ -2227,7 +2227,7 @@ return std::partial_sort_copy(__first, __last, __d_first, __d_last, __comp); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_partial_sort_copy(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, @@ -2251,7 +2251,7 @@ _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 std::copy(__i1, __j1, __i); @@ -2325,7 +2325,7 @@ return __internal::__brick_adjacent_find(__first, __last, __pred, __is_vector, __or_semantic); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_adjacent_find(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, @@ -2386,7 +2386,7 @@ std::nth_element(__first, __nth, __last, __comp); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_nth_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __nth, @@ -2462,7 +2462,7 @@ __internal::__brick_fill(__first, __last, __value, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value, @@ -2536,7 +2536,7 @@ __internal::__brick_generate(__first, __last, __g, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_generate(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Generator __g, @@ -2574,7 +2574,7 @@ return __internal::__brick_generate_n(__first, __count, __g, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator __pattern_generate_n(_ExecutionPolicy&& __exec, _OutputIterator __first, _Size __count, _Generator __g, @@ -2604,7 +2604,7 @@ __brick_remove_if(_RandomAccessIterator __first, _RandomAccessIterator __last, _UnaryPredicate __pred, /* __is_vector = */ std::true_type) noexcept { -#if __PSTL_MONOTONIC_PRESENT +#if _PSTL_MONOTONIC_PRESENT return __unseq_backend::__simd_remove_if(__first, __last - __first, __pred); #else return std::remove_if(__first, __last, __pred); @@ -2619,7 +2619,7 @@ return __internal::__brick_remove_if(__first, __last, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator __pattern_remove_if(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, @@ -2662,7 +2662,7 @@ _ForwardIterator2 __last2, _OutputIterator __d_first, _Compare __comp, /* __is_vector = */ std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::merge(__first1, __last1, __first2, __last2, __d_first, __comp); } @@ -2676,7 +2676,7 @@ return __internal::__brick_merge(__first1, __last1, __first2, __last2, __d_first, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -2710,7 +2710,7 @@ __brick_inplace_merge(_BidirectionalIterator __first, _BidirectionalIterator __middle, _BidirectionalIterator __last, _Compare __comp, /* __is_vector = */ std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial") + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial") std::inplace_merge(__first, __middle, __last, __comp); } @@ -2723,7 +2723,7 @@ __internal::__brick_inplace_merge(__first, __middle, __last, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template void __pattern_inplace_merge(_ExecutionPolicy&& __exec, _BidirectionalIterator __first, _BidirectionalIterator __middle, @@ -2780,7 +2780,7 @@ return std::includes(__first1, __last1, __first2, __last2, __comp); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_includes(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, @@ -2839,7 +2839,7 @@ constexpr auto __set_algo_cut_off = 1000; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -2930,7 +2930,7 @@ } #endif -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES //a shared parallel pattern for '__pattern_set_union' and '__pattern_set_symmetric_difference' template @@ -3067,7 +3067,7 @@ _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, /*__is_vector=*/std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::set_union(__first1, __last1, __first2, __last2, __result, __comp); } @@ -3082,7 +3082,7 @@ return __internal::__brick_set_union(__first1, __last1, __first2, __last2, __result, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -3127,7 +3127,7 @@ _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, /*__is_vector=*/std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::set_intersection(__first1, __last1, __first2, __last2, __result, __comp); } @@ -3141,7 +3141,7 @@ return __internal::__brick_set_intersection(__first1, __last1, __first2, __last2, __result, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -3224,7 +3224,7 @@ _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, /*__is_vector=*/std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::set_difference(__first1, __last1, __first2, __last2, __result, __comp); } @@ -3238,7 +3238,7 @@ return __internal::__brick_set_difference(__first1, __last1, __first2, __last2, __result, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -3320,7 +3320,7 @@ _ForwardIterator2 __last2, _OutputIterator __result, _Compare __comp, /*__is_vector=*/std::true_type) noexcept { - __PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); + _PSTL_PRAGMA_MESSAGE("Vectorized algorithm unimplemented, redirected to serial"); return std::set_symmetric_difference(__first1, __last1, __first2, __last2, __result, __comp); } @@ -3335,7 +3335,7 @@ __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -3421,7 +3421,7 @@ [&__comp](_RandomAccessIterator __it, _DifferenceType __i) { return __comp(__it[(__i - 1) / 2], __it[__i]); }); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_is_heap_until(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, @@ -3458,7 +3458,7 @@ __brick_min_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp, /* __is_vector = */ std::true_type) noexcept { -#if __PSTL_UDR_PRESENT +#if _PSTL_UDR_PRESENT return __unseq_backend::__simd_min_element(__first, __last - __first, __comp); #else return std::min_element(__first, __last, __comp); @@ -3473,7 +3473,7 @@ return __internal::__brick_min_element(__first, __last, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _RandomAccessIterator __pattern_min_element(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last, @@ -3515,7 +3515,7 @@ __brick_minmax_element(_ForwardIterator __first, _ForwardIterator __last, _Compare __comp, /* __is_vector = */ std::true_type) noexcept { -#if __PSTL_UDR_PRESENT +#if _PSTL_UDR_PRESENT return __unseq_backend::__simd_minmax_element(__first, __last - __first, __comp); #else return std::minmax_element(__first, __last, __comp); @@ -3530,7 +3530,7 @@ return __internal::__brick_minmax_element(__first, __last, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template std::pair<_ForwardIterator, _ForwardIterator> __pattern_minmax_element(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, _Compare __comp, @@ -3567,7 +3567,7 @@ __mismatch_serial(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2, _ForwardIterator2 __last2, _BinaryPredicate __pred) { -#if __PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT +#if _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) @@ -3603,7 +3603,7 @@ return __internal::__brick_mismatch(__first1, __last1, __first2, __last2, __pred, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template std::pair<_RandomAccessIterator1, _RandomAccessIterator2> @@ -3684,7 +3684,7 @@ return __internal::__brick_lexicographical_compare(__first1, __last1, __first2, __last2, __comp, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template bool __pattern_lexicographical_compare(_ExecutionPolicy&& __exec, _ForwardIterator1 __first1, _ForwardIterator1 __last1, @@ -3733,4 +3733,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_algorithm_impl_H */ +#endif /* _PSTL_ALGORITHM_IMPL_H */ Index: include/pstl/internal/execution_defs.h =================================================================== --- include/pstl/internal/execution_defs.h +++ include/pstl/internal/execution_defs.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_execution_policy_defs_H -#define __PSTL_execution_policy_defs_H +#ifndef _PSTL_EXECUTION_POLICY_DEFS_H +#define _PSTL_EXECUTION_POLICY_DEFS_H #include @@ -41,7 +41,7 @@ } }; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES // 2.5, Parallel execution policy class parallel_policy { @@ -110,7 +110,7 @@ // 2.8, Execution policy objects constexpr sequenced_policy seq{}; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES constexpr parallel_policy par{}; constexpr parallel_unsequenced_policy par_unseq{}; #endif @@ -126,7 +126,7 @@ struct is_execution_policy<__pstl::execution::sequenced_policy> : std::true_type { }; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template <> struct is_execution_policy<__pstl::execution::parallel_policy> : std::true_type { @@ -141,7 +141,7 @@ { }; -#if __PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT +#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT template constexpr bool is_execution_policy_v = __pstl::execution::is_execution_policy::value; #endif @@ -159,4 +159,4 @@ } // namespace __pstl -#endif /* __PSTL_execution_policy_defs_H */ +#endif /* _PSTL_EXECUTION_POLICY_DEFS_H */ Index: include/pstl/internal/execution_impl.h =================================================================== --- include/pstl/internal/execution_impl.h +++ include/pstl/internal/execution_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_execution_impl_H -#define __PSTL_execution_impl_H +#ifndef _PSTL_EXECUTION_IMPL_H +#define _PSTL_EXECUTION_IMPL_H #include #include @@ -87,7 +87,7 @@ typedef std::true_type allow_vector; }; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template <> struct __policy_traits { @@ -160,4 +160,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_execution_impl_H */ +#endif /* _PSTL_EXECUTION_IMPL_H */ Index: include/pstl/internal/glue_algorithm_defs.h =================================================================== --- include/pstl/internal/glue_algorithm_defs.h +++ include/pstl/internal/glue_algorithm_defs.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_glue_algorithm_defs_H -#define __PSTL_glue_algorithm_defs_H +#ifndef _PSTL_GLUE_ALGORITHM_DEFS_H +#define _PSTL_GLUE_ALGORITHM_DEFS_H #include #include @@ -549,4 +549,4 @@ _ForwardIterator2 __first2, _ForwardIterator2 __last2); } // namespace std -#endif /* __PSTL_glue_algorithm_defs_H */ +#endif /* _PSTL_GLUE_ALGORITHM_DEFS_H */ Index: include/pstl/internal/glue_algorithm_impl.h =================================================================== --- include/pstl/internal/glue_algorithm_impl.h +++ include/pstl/internal/glue_algorithm_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_glue_algorithm_impl_H -#define __PSTL_glue_algorithm_impl_H +#ifndef _PSTL_GLUE_ALGORITHM_IMPL_H +#define _PSTL_GLUE_ALGORITHM_IMPL_H #include @@ -1181,4 +1181,4 @@ } // namespace std -#endif /* __PSTL_glue_algorithm_impl_H */ +#endif /* _PSTL_GLUE_ALGORITHM_IMPL_H */ Index: include/pstl/internal/glue_execution_defs.h =================================================================== --- include/pstl/internal/glue_execution_defs.h +++ include/pstl/internal/glue_execution_defs.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_glue_execution_defs_H -#define __PSTL_glue_execution_defs_H +#ifndef _PSTL_GLUE_EXECUTION_DEFS_H +#define _PSTL_GLUE_EXECUTION_DEFS_H #include @@ -18,7 +18,7 @@ { // Type trait using __pstl::execution::is_execution_policy; -#if __PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT +#if _PSTL_CPP14_VARIABLE_TEMPLATES_PRESENT # if __INTEL_COMPILER template constexpr bool is_execution_policy_v = is_execution_policy::value; @@ -31,13 +31,13 @@ { // Standard C++ policy classes using __pstl::execution::sequenced_policy; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES using __pstl::execution::parallel_policy; using __pstl::execution::parallel_unsequenced_policy; #endif // Standard predefined policy instances using __pstl::execution::seq; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES using __pstl::execution::par; using __pstl::execution::par_unseq; #endif @@ -53,4 +53,4 @@ #include "numeric_impl.h" #include "parallel_backend.h" -#endif /* __PSTL_glue_execution_defs_H */ +#endif /* _PSTL_GLUE_EXECUTION_DEFS_H */ Index: include/pstl/internal/glue_memory_defs.h =================================================================== --- include/pstl/internal/glue_memory_defs.h +++ include/pstl/internal/glue_memory_defs.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_glue_memory_defs_H -#define __PSTL_glue_memory_defs_H +#ifndef _PSTL_GLUE_MEMORY_DEFS_H +#define _PSTL_GLUE_MEMORY_DEFS_H #include "execution_defs.h" @@ -76,4 +76,4 @@ uninitialized_value_construct_n(_ExecutionPolicy&& __exec, _ForwardIterator __first, _Size __n); } // namespace std -#endif /* __PSTL_glue_memory_defs_H */ +#endif /* _PSTL_GLUE_MEMORY_DEFS_H */ Index: include/pstl/internal/glue_memory_impl.h =================================================================== --- include/pstl/internal/glue_memory_impl.h +++ include/pstl/internal/glue_memory_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_glue_memory_impl_H -#define __PSTL_glue_memory_impl_H +#ifndef _PSTL_GLUE_MEMORY_IMPL_H +#define _PSTL_GLUE_MEMORY_IMPL_H #include "execution_defs.h" #include "utils.h" @@ -358,4 +358,4 @@ } // namespace std -#endif /* __PSTL_glue_memory_imple_H */ +#endif /* _PSTL_GLUE_MEMORY_IMPL_H */ Index: include/pstl/internal/glue_numeric_defs.h =================================================================== --- include/pstl/internal/glue_numeric_defs.h +++ include/pstl/internal/glue_numeric_defs.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_glue_numeric_defs_H -#define __PSTL_glue_numeric_defs_H +#ifndef _PSTL_GLUE_NUMERIC_DEFS_H +#define _PSTL_GLUE_NUMERIC_DEFS_H #include @@ -115,4 +115,4 @@ _ForwardIterator2 __d_first); } // namespace std -#endif /* __PSTL_glue_numeric_defs_H */ +#endif /* _PSTL_GLUE_NUMERIC_DEFS_H */ Index: include/pstl/internal/glue_numeric_impl.h =================================================================== --- include/pstl/internal/glue_numeric_impl.h +++ include/pstl/internal/glue_numeric_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_glue_numeric_impl_H -#define __PSTL_glue_numeric_impl_H +#ifndef _PSTL_GLUE_NUMERIC_IMPL_H +#define _PSTL_GLUE_NUMERIC_IMPL_H #include @@ -222,4 +222,4 @@ } // namespace std -#endif /* __PSTL_glue_numeric_impl_H_ */ +#endif /* _PSTL_GLUE_NUMERIC_IMPL_H_ */ Index: include/pstl/internal/memory_impl.h =================================================================== --- include/pstl/internal/memory_impl.h +++ include/pstl/internal/memory_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_memory_impl_H -#define __PSTL_memory_impl_H +#ifndef _PSTL_MEMORY_IMPL_H +#define _PSTL_MEMORY_IMPL_H #include @@ -53,4 +53,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_memory_impl_H */ +#endif /* _PSTL_MEMORY_IMPL_H */ Index: include/pstl/internal/numeric_fwd.h =================================================================== --- include/pstl/internal/numeric_fwd.h +++ include/pstl/internal/numeric_fwd.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_numeric_fwd_H -#define __PSTL_numeric_fwd_H +#ifndef _PSTL_NUMERIC_FWD_H +#define _PSTL_NUMERIC_FWD_H #include #include @@ -39,7 +39,7 @@ _BinaryOperation1, _BinaryOperation2, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _Tp @@ -67,7 +67,7 @@ _UnaryOperation, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _Tp @@ -99,7 +99,7 @@ _BinaryOperation, _Inclusive, _IsVector, /*is_parallel=*/std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template typename std::enable_if::value, _OutputIterator>::type @@ -107,7 +107,7 @@ _UnaryOperation, _Tp, _BinaryOperation, _Inclusive, _IsVector, /*is_parallel=*/std::true_type); #endif -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template typename std::enable_if::value, _OutputIterator>::type @@ -133,7 +133,7 @@ __pattern_adjacent_difference(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, _OutputIterator, _BinaryOperation, _IsVector, /*is_parallel*/ std::false_type) noexcept; -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _OutputIterator @@ -143,4 +143,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_numeric_fwd_H */ +#endif /* _PSTL_NUMERIC_FWD_H */ Index: include/pstl/internal/numeric_impl.h =================================================================== --- include/pstl/internal/numeric_impl.h +++ include/pstl/internal/numeric_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_numeric_impl_H -#define __PSTL_numeric_impl_H +#ifndef _PSTL_NUMERIC_IMPL_H +#define _PSTL_NUMERIC_IMPL_H #include #include @@ -18,7 +18,7 @@ #include "unseq_backend_simd.h" #include "algorithm_fwd.h" -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES # include "parallel_backend.h" #endif @@ -63,7 +63,7 @@ return __brick_transform_reduce(__first1, __last1, __first2, __init, __binary_op1, __binary_op2, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _Tp @@ -125,7 +125,7 @@ return __internal::__brick_transform_reduce(__first, __last, __init, __binary_op, __unary_op, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _Tp @@ -160,7 +160,7 @@ for (; __first != __last; ++__first, ++__result) { *__result = __init; - __PSTL_PRAGMA_FORCEINLINE + _PSTL_PRAGMA_FORCEINLINE __init = __binary_op(__init, __unary_op(*__first)); } return std::make_pair(__result, __init); @@ -175,7 +175,7 @@ { for (; __first != __last; ++__first, ++__result) { - __PSTL_PRAGMA_FORCEINLINE + _PSTL_PRAGMA_FORCEINLINE __init = __binary_op(__init, __unary_op(*__first)); *__result = __init; } @@ -196,7 +196,7 @@ _UnaryOperation __unary_op, _Tp __init, _BinaryOperation __binary_op, _Inclusive, /*is_vector=*/std::true_type) noexcept { -#if (__PSTL_UDS_PRESENT) +#if (_PSTL_UDS_PRESENT) return __unseq_backend::__simd_scan(__first, __last - __first, __result, __unary_op, __init, __binary_op, _Inclusive()); #else @@ -229,7 +229,7 @@ .first; } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template typename std::enable_if::value, _OutputIterator>::type @@ -261,7 +261,7 @@ } #endif -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template typename std::enable_if::value, _OutputIterator>::type @@ -288,7 +288,7 @@ [__result, &__binary_op](_DifferenceType __i, _DifferenceType __len, _Tp __initial) { return *(std::transform(__result + __i, __result + __i + __len, __result + __i, [&__initial, &__binary_op](const _Tp& __x) { - __PSTL_PRAGMA_FORCEINLINE + _PSTL_PRAGMA_FORCEINLINE return __binary_op(__initial, __x); }) - 1); @@ -338,7 +338,7 @@ return __internal::__brick_adjacent_difference(__first, __last, __d_first, __op, __is_vector); } -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES template _ForwardIterator2 @@ -367,4 +367,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_numeric_impl_H */ +#endif /* _PSTL_NUMERIC_IMPL_H */ Index: include/pstl/internal/parallel_backend.h =================================================================== --- include/pstl/internal/parallel_backend.h +++ include/pstl/internal/parallel_backend.h @@ -7,13 +7,13 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_parallel_backend_H -#define __PSTL_parallel_backend_H +#ifndef _PSTL_PARALLEL_BACKEND_H +#define _PSTL_PARALLEL_BACKEND_H -#if __PSTL_PAR_BACKEND_TBB +#if _PSTL_PAR_BACKEND_TBB # include "parallel_backend_tbb.h" #else -__PSTL_PRAGMA_MESSAGE("Parallel backend was not specified"); +_PSTL_PRAGMA_MESSAGE("Parallel backend was not specified"); #endif -#endif /* __PSTL_parallel_backend_H */ +#endif /* _PSTL_PARALLEL_BACKEND_H */ Index: include/pstl/internal/parallel_backend_tbb.h =================================================================== --- include/pstl/internal/parallel_backend_tbb.h +++ include/pstl/internal/parallel_backend_tbb.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_parallel_backend_tbb_H -#define __PSTL_parallel_backend_tbb_H +#ifndef _PSTL_PARALLEL_BACKEND_TBB_H +#define _PSTL_PARALLEL_BACKEND_TBB_H #include #include @@ -432,7 +432,7 @@ } }; -#define __PSTL_MERGE_CUT_OFF 2000 +#define _PSTL_MERGE_CUT_OFF 2000 template @@ -444,7 +444,7 @@ typedef typename std::iterator_traits<_RandomAccessIterator2>::difference_type _DifferenceType2; typedef typename std::common_type<_DifferenceType1, _DifferenceType2>::type _SizeType; const _SizeType __n = (_M_xe - _M_xs) + (_M_ye - _M_ys); - const _SizeType __merge_cut_off = __PSTL_MERGE_CUT_OFF; + const _SizeType __merge_cut_off = _PSTL_MERGE_CUT_OFF; if (__n <= __merge_cut_off) { _M_leaf_merge(_M_xs, _M_xe, _M_ys, _M_ye, _M_zs, _M_comp); @@ -515,7 +515,7 @@ } }; -#define __PSTL_STABLE_SORT_CUT_OFF 500 +#define _PSTL_STABLE_SORT_CUT_OFF 500 template tbb::task* @@ -523,7 +523,7 @@ { const _SizeType __n = _M_xe - _M_xs; const _SizeType __nmerge = _M_nsort > 0 ? _M_nsort : __n; - const _SizeType __sort_cut_off = __PSTL_STABLE_SORT_CUT_OFF; + const _SizeType __sort_cut_off = _PSTL_STABLE_SORT_CUT_OFF; if (__n <= __sort_cut_off) { _M_leaf_sort(_M_xs, _M_xe, _M_comp); @@ -595,7 +595,7 @@ if (__nsort == 0) __nsort = __n; - const _DifferenceType __sort_cut_off = __PSTL_STABLE_SORT_CUT_OFF; + const _DifferenceType __sort_cut_off = _PSTL_STABLE_SORT_CUT_OFF; if (__n > __sort_cut_off) { assert(__nsort > 0 && __nsort <= __n); @@ -626,7 +626,7 @@ typedef typename std::iterator_traits<_RandomAccessIterator2>::difference_type _DifferenceType2; typedef typename std::common_type<_DifferenceType1, _DifferenceType2>::type _SizeType; const _SizeType __n = (__xe - __xs) + (__ye - __ys); - const _SizeType __merge_cut_off = __PSTL_MERGE_CUT_OFF; + const _SizeType __merge_cut_off = _PSTL_MERGE_CUT_OFF; if (__n <= __merge_cut_off) { // Fall back on serial merge @@ -658,4 +658,4 @@ } // namespace __par_backend } // namespace __pstl -#endif /* __PSTL_parallel_backend_tbb_H */ +#endif /* _PSTL_PARALLEL_BACKEND_TBB_H */ Index: include/pstl/internal/parallel_backend_utils.h =================================================================== --- include/pstl/internal/parallel_backend_utils.h +++ include/pstl/internal/parallel_backend_utils.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_parallel_backend_utils_H -#define __PSTL_parallel_backend_utils_H +#ifndef _PSTL_PARALLEL_BACKEND_UTILS_H +#define _PSTL_PARALLEL_BACKEND_UTILS_H #include #include @@ -193,4 +193,4 @@ } // namespace __par_backend } // namespace __pstl -#endif /* __PSTL_parallel_backend_utils_H */ +#endif /* _PSTL_PARALLEL_BACKEND_UTILS_H */ Index: include/pstl/internal/parallel_impl.h =================================================================== --- include/pstl/internal/parallel_impl.h +++ include/pstl/internal/parallel_impl.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_parallel_impl_H -#define __PSTL_parallel_impl_H +#ifndef _PSTL_PARALLEL_IMPL_H +#define _PSTL_PARALLEL_IMPL_H #include // This header defines the minimum set of parallel routines required to support Parallel STL, @@ -78,4 +78,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_parallel_impl_H */ +#endif /* _PSTL_PARALLEL_IMPL_H */ Index: include/pstl/internal/pstl_config.h =================================================================== --- include/pstl/internal/pstl_config.h +++ include/pstl/internal/pstl_config.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_config_H -#define __PSTL_config_H +#ifndef _PSTL_CONFIG_H +#define _PSTL_CONFIG_H #define PSTL_VERSION 203 #define PSTL_VERSION_MAJOR (PSTL_VERSION / 100) @@ -16,115 +16,115 @@ // Check the user-defined macro for parallel policies #if defined(PSTL_USE_PARALLEL_POLICIES) -# undef __PSTL_USE_PAR_POLICIES -# define __PSTL_USE_PAR_POLICIES PSTL_USE_PARALLEL_POLICIES +# undef _PSTL_USE_PAR_POLICIES +# define _PSTL_USE_PAR_POLICIES PSTL_USE_PARALLEL_POLICIES // Check the internal macro for parallel policies -#elif !defined(__PSTL_USE_PAR_POLICIES) -# define __PSTL_USE_PAR_POLICIES 1 +#elif !defined(_PSTL_USE_PAR_POLICIES) +# define _PSTL_USE_PAR_POLICIES 1 #endif -#if __PSTL_USE_PAR_POLICIES -# if !defined(__PSTL_PAR_BACKEND_TBB) -# define __PSTL_PAR_BACKEND_TBB 1 +#if _PSTL_USE_PAR_POLICIES +# if !defined(_PSTL_PAR_BACKEND_TBB) +# define _PSTL_PAR_BACKEND_TBB 1 # endif #else -# undef __PSTL_PAR_BACKEND_TBB +# undef _PSTL_PAR_BACKEND_TBB #endif // Check the user-defined macro for warnings #if defined(PSTL_USAGE_WARNINGS) -# undef __PSTL_USAGE_WARNINGS -# define __PSTL_USAGE_WARNINGS 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 +#elif !defined(_PSTL_USAGE_WARNINGS) +# define _PSTL_USAGE_WARNINGS 0 #endif // Portability "#pragma" definition #ifdef _MSC_VER -# define __PSTL_PRAGMA(x) __pragma(x) +# define _PSTL_PRAGMA(x) __pragma(x) #else -# define __PSTL_PRAGMA(x) _Pragma(# x) +# define _PSTL_PRAGMA(x) _Pragma(# x) #endif -#define __PSTL_STRING_AUX(x) #x -#define __PSTL_STRING(x) __PSTL_STRING_AUX(x) -#define __PSTL_STRING_CONCAT(x, y) x #y +#define _PSTL_STRING_AUX(x) #x +#define _PSTL_STRING(x) _PSTL_STRING_AUX(x) +#define _PSTL_STRING_CONCAT(x, y) x #y -// note that when ICC or Clang is in use, __PSTL_GCC_VERSION might not fully match +// note that when ICC or Clang is in use, _PSTL_GCC_VERSION might not fully match // the actual GCC version on the system. -#define __PSTL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) +#define _PSTL_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) #if __clang__ // according to clang documentation, version can be vendor specific -# define __PSTL_CLANG_VERSION (__clang_major__ * 10000 + __clang_minor__ * 100 + __clang_patchlevel__) +# 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) -# 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)) +#if (_OPENMP >= 201307) || (__INTEL_COMPILER >= 1600) || (!defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900) +# 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)) #elif !defined(_MSC_VER) //#pragma simd -# define __PSTL_PRAGMA_SIMD __PSTL_PRAGMA(simd) -# define __PSTL_PRAGMA_DECLARE_SIMD -# define __PSTL_PRAGMA_SIMD_REDUCTION(PRM) __PSTL_PRAGMA(simd reduction(PRM)) +# define _PSTL_PRAGMA_SIMD _PSTL_PRAGMA(simd) +# define _PSTL_PRAGMA_DECLARE_SIMD +# define _PSTL_PRAGMA_SIMD_REDUCTION(PRM) _PSTL_PRAGMA(simd reduction(PRM)) #else //no simd -# define __PSTL_PRAGMA_SIMD -# define __PSTL_PRAGMA_DECLARE_SIMD -# define __PSTL_PRAGMA_SIMD_REDUCTION(PRM) +# define _PSTL_PRAGMA_SIMD +# define _PSTL_PRAGMA_DECLARE_SIMD +# define _PSTL_PRAGMA_SIMD_REDUCTION(PRM) #endif //Enable SIMD #if (__INTEL_COMPILER) -# define __PSTL_PRAGMA_FORCEINLINE __PSTL_PRAGMA(forceinline) +# define _PSTL_PRAGMA_FORCEINLINE _PSTL_PRAGMA(forceinline) #else -# define __PSTL_PRAGMA_FORCEINLINE +# define _PSTL_PRAGMA_FORCEINLINE #endif #if (__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)) -#else -# define __PSTL_PRAGMA_SIMD_SCAN(PRM) -# define __PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM) -# define __PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM) +# 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)) +#else +# define _PSTL_PRAGMA_SIMD_SCAN(PRM) +# define _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(PRM) +# define _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(PRM) #endif // 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_CPP17_EXECUTION_POLICIES_PRESENT (_MSC_VER >= 1912) -#define __PSTL_CPP14_2RANGE_MISMATCH_EQUAL_PRESENT \ +#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 \ +#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 \ +#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) -#define __PSTL_EARLYEXIT_PRESENT (__INTEL_COMPILER >= 1800) -#define __PSTL_MONOTONIC_PRESENT (__INTEL_COMPILER >= 1800) +#define _PSTL_EARLYEXIT_PRESENT (__INTEL_COMPILER >= 1800) +#define _PSTL_MONOTONIC_PRESENT (__INTEL_COMPILER >= 1800) -#if (__INTEL_COMPILER >= 1900 || !defined(__INTEL_COMPILER) && __PSTL_GCC_VERSION >= 40900 || _OPENMP >= 201307) -# define __PSTL_UDR_PRESENT 1 +#if (__INTEL_COMPILER >= 1900 || !defined(__INTEL_COMPILER) && _PSTL_GCC_VERSION >= 40900 || _OPENMP >= 201307) +# define _PSTL_UDR_PRESENT 1 #else -# define __PSTL_UDR_PRESENT 0 +# define _PSTL_UDR_PRESENT 0 #endif -#define __PSTL_UDS_PRESENT (__INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626) +#define _PSTL_UDS_PRESENT (__INTEL_COMPILER >= 1900 && __INTEL_COMPILER_BUILD_DATE >= 20180626) -#if __PSTL_EARLYEXIT_PRESENT -# define __PSTL_PRAGMA_SIMD_EARLYEXIT __PSTL_PRAGMA(omp simd early_exit) +#if _PSTL_EARLYEXIT_PRESENT +# define _PSTL_PRAGMA_SIMD_EARLYEXIT _PSTL_PRAGMA(omp simd early_exit) #else -# define __PSTL_PRAGMA_SIMD_EARLYEXIT +# define _PSTL_PRAGMA_SIMD_EARLYEXIT #endif -#if __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)) +#if _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 -# define __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) -# define __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) +# define _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(PRM) +# define _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(PRM1, PRM2) #endif // Declaration of reduction functor, where @@ -134,41 +134,41 @@ // omp_out - refers to the final value of the combiner operator // omp_priv - refers to the private copy of the initial value // omp_orig - refers to the original variable to be reduced -#define __PSTL_PRAGMA_DECLARE_REDUCTION(NAME, OP) \ - __PSTL_PRAGMA(omp declare reduction(NAME:OP : omp_out(omp_in)) initializer(omp_priv = omp_orig)) +#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) -# define __PSTL_PRAGMA_VECTOR_UNALIGNED __PSTL_PRAGMA(vector unaligned) +# define _PSTL_PRAGMA_VECTOR_UNALIGNED _PSTL_PRAGMA(vector unaligned) #else -# define __PSTL_PRAGMA_VECTOR_UNALIGNED +# define _PSTL_PRAGMA_VECTOR_UNALIGNED #endif // Check the user-defined macro to use non-temporal stores #if defined(PSTL_USE_NONTEMPORAL_STORES) && (__INTEL_COMPILER >= 1600) -# define __PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED __PSTL_PRAGMA(vector nontemporal) +# define _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED _PSTL_PRAGMA(vector nontemporal) #else -# define __PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED +# define _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED #endif #if _MSC_VER || __INTEL_COMPILER //the preprocessors don't type a message location -# define __PSTL_PRAGMA_LOCATION __FILE__ ":" __PSTL_STRING(__LINE__) ": [Parallel STL message]: " +# define _PSTL_PRAGMA_LOCATION __FILE__ ":" _PSTL_STRING(__LINE__) ": [Parallel STL message]: " #else -# define __PSTL_PRAGMA_LOCATION " [Parallel STL message]: " +# define _PSTL_PRAGMA_LOCATION " [Parallel STL message]: " #endif -#define __PSTL_PRAGMA_MESSAGE_IMPL(x) __PSTL_PRAGMA(message(__PSTL_STRING_CONCAT(__PSTL_PRAGMA_LOCATION, x))) +#define _PSTL_PRAGMA_MESSAGE_IMPL(x) _PSTL_PRAGMA(message(_PSTL_STRING_CONCAT(_PSTL_PRAGMA_LOCATION, x))) -#if __PSTL_USAGE_WARNINGS -# define __PSTL_PRAGMA_MESSAGE(x) __PSTL_PRAGMA_MESSAGE_IMPL(x) -# define __PSTL_PRAGMA_MESSAGE_POLICIES(x) __PSTL_PRAGMA_MESSAGE_IMPL(x) +#if _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 -# define __PSTL_PRAGMA_MESSAGE(x) -# define __PSTL_PRAGMA_MESSAGE_POLICIES(x) +# define _PSTL_PRAGMA_MESSAGE(x) +# define _PSTL_PRAGMA_MESSAGE_POLICIES(x) #endif // broken macros -#define __PSTL_CPP11_STD_ROTATE_BROKEN ((__GLIBCXX__ && __GLIBCXX__ < 20150716) || (_MSC_VER && _MSC_VER < 1800)) +#define _PSTL_CPP11_STD_ROTATE_BROKEN ((__GLIBCXX__ && __GLIBCXX__ < 20150716) || (_MSC_VER && _MSC_VER < 1800)) -#define __PSTL_ICC_18_OMP_SIMD_BROKEN (__INTEL_COMPILER == 1800) +#define _PSTL_ICC_18_OMP_SIMD_BROKEN (__INTEL_COMPILER == 1800) -#endif /* __PSTL_config_H */ +#endif /* _PSTL_CONFIG_H */ Index: include/pstl/internal/unseq_backend_simd.h =================================================================== --- include/pstl/internal/unseq_backend_simd.h +++ include/pstl/internal/unseq_backend_simd.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_unseq_backend_simd_H -#define __PSTL_unseq_backend_simd_H +#ifndef _PSTL_UNSEQ_BACKEND_SIMD_H +#define _PSTL_UNSEQ_BACKEND_SIMD_H #include @@ -28,7 +28,7 @@ _Iterator __simd_walk_1(_Iterator __first, _DifferenceType __n, _Function __f) noexcept { - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) __f(__first[__i]); @@ -39,7 +39,7 @@ _Iterator2 __simd_walk_2(_Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Function __f) noexcept { - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) __f(__first1[__i], __first2[__i]); return __first2 + __n; @@ -50,7 +50,7 @@ __simd_walk_3(_Iterator1 __first1, _DifferenceType __n, _Iterator2 __first2, _Iterator3 __first3, _Function __f) noexcept { - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) __f(__first1[__i], __first2[__i], __first3[__i]); return __first3 + __n; @@ -61,10 +61,10 @@ bool __simd_or(_Index __first, _DifferenceType __n, _Pred __pred) noexcept { -#if __PSTL_EARLYEXIT_PRESENT +#if _PSTL_EARLYEXIT_PRESENT _DifferenceType __i; - __PSTL_PRAGMA_VECTOR_UNALIGNED - __PSTL_PRAGMA_SIMD_EARLYEXIT + _PSTL_PRAGMA_VECTOR_UNALIGNED + _PSTL_PRAGMA_SIMD_EARLYEXIT for (__i = 0; __i < __n; ++__i) if (__pred(__first[__i])) break; @@ -75,7 +75,7 @@ while (__last != __first) { int32_t __flag = 1; - __PSTL_PRAGMA_SIMD_REDUCTION(& : __flag) + _PSTL_PRAGMA_SIMD_REDUCTION(& : __flag) for (_DifferenceType __i = 0; __i < __block_size; ++__i) if (__pred(*(__first + __i))) __flag = 0; @@ -101,10 +101,10 @@ _Index __simd_first(_Index __first, _DifferenceType __begin, _DifferenceType __end, _Compare __comp) noexcept { -#if __PSTL_EARLYEXIT_PRESENT +#if _PSTL_EARLYEXIT_PRESENT _DifferenceType __i = __begin; - __PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part - __PSTL_PRAGMA_SIMD_EARLYEXIT for (; __i < __end; ++__i) + _PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part + _PSTL_PRAGMA_SIMD_EARLYEXIT for (; __i < __end; ++__i) { if (__comp(__first, __i)) { @@ -119,10 +119,10 @@ while (__end - __begin >= __block_size) { _DifferenceType __found = 0; - __PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part - __PSTL_PRAGMA_SIMD_REDUCTION(| - : __found) for (_DifferenceType __i = __begin; __i < __begin + __block_size; - ++__i) + _PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part + _PSTL_PRAGMA_SIMD_REDUCTION(| + : __found) for (_DifferenceType __i = __begin; __i < __begin + __block_size; + ++__i) { const _DifferenceType __t = __comp(__first, __i); __lane[__i - __begin] = __t; @@ -154,17 +154,17 @@ ++__begin; } return __first + __end; -#endif //__PSTL_EARLYEXIT_PRESENT +#endif //_PSTL_EARLYEXIT_PRESENT } template std::pair<_Index1, _Index2> __simd_first(_Index1 __first1, _DifferenceType __n, _Index2 __first2, _Pred __pred) noexcept { -#if __PSTL_EARLYEXIT_PRESENT +#if _PSTL_EARLYEXIT_PRESENT _DifferenceType __i = 0; - __PSTL_PRAGMA_VECTOR_UNALIGNED - __PSTL_PRAGMA_SIMD_EARLYEXIT + _PSTL_PRAGMA_VECTOR_UNALIGNED + _PSTL_PRAGMA_SIMD_EARLYEXIT for (; __i < __n; ++__i) if (__pred(__first1[__i], __first2[__i])) break; @@ -179,9 +179,9 @@ { _DifferenceType __found = 0; _DifferenceType __i; - __PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part - __PSTL_PRAGMA_SIMD_REDUCTION(| - : __found) for (__i = 0; __i < __block_size; ++__i) + _PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part + _PSTL_PRAGMA_SIMD_REDUCTION(| + : __found) for (__i = 0; __i < __block_size; ++__i) { const _DifferenceType __t = __pred(__first1[__i], __first2[__i]); __lane[__i] = __t; @@ -208,7 +208,7 @@ return std::make_pair(__first1, __first2); return std::make_pair(__last1, __last2); -#endif //__PSTL_EARLYEXIT_PRESENT +#endif //_PSTL_EARLYEXIT_PRESENT } template @@ -216,7 +216,7 @@ __simd_count(_Index __index, _DifferenceType __n, _Pred __pred) noexcept { _DifferenceType __count = 0; - __PSTL_PRAGMA_SIMD_REDUCTION(+ : __count) + _PSTL_PRAGMA_SIMD_REDUCTION(+ : __count) for (_DifferenceType __i = 0; __i < __n; ++__i) if (__pred(*(__index + __i))) ++__count; @@ -235,10 +235,10 @@ _DifferenceType __cnt = 1; __result[0] = __first[0]; - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 1; __i < __n; ++__i) { - __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) + _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) if (!__pred(__first[__i], __first[__i - 1])) { __result[__cnt] = __first[__i]; @@ -252,8 +252,8 @@ _OutputIterator __simd_assign(_InputIterator __first, _DifferenceType __n, _OutputIterator __result, _Assigner __assigner) noexcept { - __PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED - __PSTL_PRAGMA_SIMD + _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) __assigner(__first + __i, __result + __i); return __result + __n; @@ -265,10 +265,10 @@ { _DifferenceType __cnt = 0; - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) { - __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) + _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) if (__pred(__first[__i])) { __result[__cnt] = __first[__i]; @@ -284,7 +284,7 @@ { _DifferenceType __count = 0; - __PSTL_PRAGMA_SIMD_REDUCTION(+ : __count) + _PSTL_PRAGMA_SIMD_REDUCTION(+ : __count) for (_DifferenceType __i = 0; __i < __n; ++__i) { __mask[__i] = !__pred(__first[__i], __first[__i - 1]); @@ -299,7 +299,7 @@ { _DifferenceType __count = 0; - __PSTL_PRAGMA_SIMD_REDUCTION(+ : __count) + _PSTL_PRAGMA_SIMD_REDUCTION(+ : __count) for (_DifferenceType __i = 0; __i < __n; ++__i) { __mask[__i] = __pred(__first[__i]); @@ -314,12 +314,12 @@ _Assigner __assigner) noexcept { _DifferenceType __cnt = 0; - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) { if (__mask[__i]) { - __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) + _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) { __assigner(__first + __i, __result + __cnt); ++__cnt; @@ -334,10 +334,10 @@ _OutputIterator2 __out_false, bool* __mask) noexcept { _DifferenceType __cnt_true = 0, __cnt_false = 0; - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) { - __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(__cnt_true : 1, __cnt_false : 1) + _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(__cnt_true : 1, __cnt_false : 1) if (__mask[__i]) { __out_true[__cnt_true] = __first[__i]; @@ -355,8 +355,8 @@ _Index __simd_fill_n(_Index __first, _DifferenceType __n, const _Tp& __value) noexcept { - __PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED - __PSTL_PRAGMA_SIMD + _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) __first[__i] = __value; return __first + __n; @@ -366,8 +366,8 @@ _Index __simd_generate_n(_Index __first, _DifferenceType __size, _Generator __g) noexcept { - __PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED - __PSTL_PRAGMA_SIMD + _PSTL_USE_NONTEMPORAL_STORES_IF_ALLOWED + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __size; ++__i) __first[__i] = __g(); return __first + __size; @@ -383,11 +383,11 @@ typedef typename std::iterator_traits<_Index>::difference_type _DifferenceType; _DifferenceType __i = 0; -#if __PSTL_EARLYEXIT_PRESENT +#if _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 - __PSTL_PRAGMA_SIMD_EARLYEXIT + _PSTL_PRAGMA_VECTOR_UNALIGNED + _PSTL_PRAGMA_SIMD_EARLYEXIT for (; __i < __n; ++__i) if (__pred(__first[__i], __first[__i + 1])) break; @@ -401,9 +401,9 @@ while (__last - __first >= __block_size) { _DifferenceType __found = 0; - __PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part - __PSTL_PRAGMA_SIMD_REDUCTION(| - : __found) for (__i = 0; __i < __block_size - 1; ++__i) + _PSTL_PRAGMA_VECTOR_UNALIGNED // Do not generate peel loop part + _PSTL_PRAGMA_SIMD_REDUCTION(| + : __found) for (__i = 0; __i < __block_size - 1; ++__i) { //TODO: to improve SIMD vectorization const _DifferenceType __t = __pred(*(__first + __i), *(__first + __i + 1)); @@ -446,7 +446,7 @@ typename std::enable_if::value, _Tp>::type __simd_transform_reduce(_DifferenceType __n, _Tp __init, _BinaryOperation, _UnaryOperation __f) noexcept { - __PSTL_PRAGMA_SIMD_REDUCTION(+ : __init) + _PSTL_PRAGMA_SIMD_REDUCTION(+ : __init) for (_DifferenceType __i = 0; __i < __n; ++__i) __init += __f(__i); return __init; @@ -463,7 +463,7 @@ _Tp* __lane = reinterpret_cast<_Tp*>(__lane_); // initializer - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_Size __i = 0; __i < __block_size; ++__i) { ::new (__lane + __i) _Tp(__binary_op(__f(__i), __f(__block_size + __i))); @@ -473,14 +473,14 @@ const _Size last_iteration = __block_size * (__n / __block_size); for (; __i < last_iteration; __i += __block_size) { - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_Size __j = 0; __j < __block_size; ++__j) { __lane[__j] = __binary_op(__lane[__j], __f(__i + __j)); } } // remainder - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_Size __j = 0; __j < __n - last_iteration; ++__j) { __lane[__j] = __binary_op(__lane[__j], __f(last_iteration + __j)); @@ -491,7 +491,7 @@ __init = __binary_op(__init, __lane[__i]); } // destroyer - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_Size __i = 0; __i < __block_size; ++__i) { __lane[__i].~_Tp(); @@ -514,11 +514,11 @@ __simd_scan(_InputIterator __first, _Size __n, _OutputIterator __result, _UnaryOperation __unary_op, _Tp __init, _BinaryOperation, /*Inclusive*/ std::false_type) { - __PSTL_PRAGMA_SIMD_SCAN(+ : __init) + _PSTL_PRAGMA_SIMD_SCAN(+ : __init) for (_Size __i = 0; __i < __n; ++__i) { __result[__i] = __init; - __PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(__init) + _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(__init) __init += __unary_op(__first[__i]); } return std::make_pair(__result + __n, __init); @@ -552,14 +552,14 @@ typedef _Combiner<_Tp, _BinaryOperation> _CombinerType; _CombinerType __init_{__init, &__binary_op}; - __PSTL_PRAGMA_DECLARE_REDUCTION(__bin_op, _CombinerType) + _PSTL_PRAGMA_DECLARE_REDUCTION(__bin_op, _CombinerType) - __PSTL_PRAGMA_SIMD_SCAN(__bin_op : __init_) + _PSTL_PRAGMA_SIMD_SCAN(__bin_op : __init_) for (_Size __i = 0; __i < __n; ++__i) { __result[__i] = __init_.__value; - __PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(__init_) - __PSTL_PRAGMA_FORCEINLINE + _PSTL_PRAGMA_SIMD_EXCLUSIVE_SCAN(__init_) + _PSTL_PRAGMA_FORCEINLINE __init_.__value = __binary_op(__init_.__value, __unary_op(__first[__i])); } return std::make_pair(__result + __n, __init_.__value); @@ -572,11 +572,11 @@ __simd_scan(_InputIterator __first, _Size __n, _OutputIterator __result, _UnaryOperation __unary_op, _Tp __init, _BinaryOperation, /*Inclusive*/ std::true_type) { - __PSTL_PRAGMA_SIMD_SCAN(+ : __init) + _PSTL_PRAGMA_SIMD_SCAN(+ : __init) for (_Size __i = 0; __i < __n; ++__i) { __init += __unary_op(__first[__i]); - __PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(__init) + _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(__init) __result[__i] = __init; } return std::make_pair(__result + __n, __init); @@ -592,14 +592,14 @@ typedef _Combiner<_Tp, _BinaryOperation> _CombinerType; _CombinerType __init_{__init, &__binary_op}; - __PSTL_PRAGMA_DECLARE_REDUCTION(__bin_op, _CombinerType) + _PSTL_PRAGMA_DECLARE_REDUCTION(__bin_op, _CombinerType) - __PSTL_PRAGMA_SIMD_SCAN(__bin_op : __init_) + _PSTL_PRAGMA_SIMD_SCAN(__bin_op : __init_) for (_Size __i = 0; __i < __n; ++__i) { - __PSTL_PRAGMA_FORCEINLINE + _PSTL_PRAGMA_FORCEINLINE __init_.__value = __binary_op(__init_.__value, __unary_op(__first[__i])); - __PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(__init_) + _PSTL_PRAGMA_SIMD_INCLUSIVE_SCAN(__init_) __result[__i] = __init_.__value; } return std::make_pair(__result + __n, __init_.__value); @@ -633,7 +633,7 @@ { } - __PSTL_PRAGMA_DECLARE_SIMD + _PSTL_PRAGMA_DECLARE_SIMD void operator()(const _ComplexType& __obj) { @@ -648,9 +648,9 @@ _ComplexType __init{*__first, &__comp}; - __PSTL_PRAGMA_DECLARE_REDUCTION(__min_func, _ComplexType) + _PSTL_PRAGMA_DECLARE_REDUCTION(__min_func, _ComplexType) - __PSTL_PRAGMA_SIMD_REDUCTION(__min_func : __init) + _PSTL_PRAGMA_SIMD_REDUCTION(__min_func : __init) for (_Size __i = 1; __i < __n; ++__i) { const _ValueType __min_val = __init.__min_val; @@ -727,9 +727,9 @@ _ComplexType __init{*__first, *__first, &__comp}; - __PSTL_PRAGMA_DECLARE_REDUCTION(__min_func, _ComplexType); + _PSTL_PRAGMA_DECLARE_REDUCTION(__min_func, _ComplexType); - __PSTL_PRAGMA_SIMD_REDUCTION(__min_func : __init) + _PSTL_PRAGMA_SIMD_REDUCTION(__min_func : __init) for (_Size __i = 1; __i < __n; ++__i) { auto __min_val = __init.__min_val; @@ -757,10 +757,10 @@ { _DifferenceType __cnt_true = 0, __cnt_false = 0; - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 0; __i < __n; ++__i) { - __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(__cnt_true : 1, __cnt_false : 1) + _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC_2ARGS(__cnt_true : 1, __cnt_false : 1) if (__pred(__first[__i])) { __out_true[__cnt_true] = __first[__i]; @@ -838,10 +838,10 @@ } _DifferenceType __cnt = 0; - __PSTL_PRAGMA_SIMD + _PSTL_PRAGMA_SIMD for (_DifferenceType __i = 1; __i < __n; ++__i) { - __PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) + _PSTL_PRAGMA_SIMD_ORDERED_MONOTONIC(__cnt : 1) if (!__pred(__current[__i])) { __current[__cnt] = std::move(__current[__i]); @@ -853,4 +853,4 @@ } // namespace __unseq_backend } // namespace __pstl -#endif /* __PSTL_unseq_backend_simd_H */ +#endif /* _PSTL_UNSEQ_BACKEND_SIMD_H */ Index: include/pstl/internal/utils.h =================================================================== --- include/pstl/internal/utils.h +++ include/pstl/internal/utils.h @@ -7,8 +7,8 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_utils_H -#define __PSTL_utils_H +#ifndef _PSTL_UTILS_H +#define _PSTL_UTILS_H #include #include @@ -219,4 +219,4 @@ } // namespace __internal } // namespace __pstl -#endif /* __PSTL_utils_H */ +#endif /* _PSTL_UTILS_H */ Index: include/pstl/memory =================================================================== --- include/pstl/memory +++ include/pstl/memory @@ -7,18 +7,18 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_memory -#define __PSTL_memory +#ifndef _PSTL_MEMORY +#define _PSTL_MEMORY #include "internal/pstl_config.h" -#if __PSTL_EXECUTION_POLICIES_DEFINED +#if _PSTL_EXECUTION_POLICIES_DEFINED // If has already been included, pull in implementations # include "internal/glue_memory_impl.h" #else // Otherwise just pull in forward declarations # include "internal/glue_memory_defs.h" -# define __PSTL_MEMORY_FORWARD_DECLARED 1 +# define _PSTL_MEMORY_FORWARD_DECLARED 1 #endif -#endif /* __PSTL_memory */ +#endif /* _PSTL_MEMORY */ Index: include/pstl/numeric =================================================================== --- include/pstl/numeric +++ include/pstl/numeric @@ -7,18 +7,18 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_numeric -#define __PSTL_numeric +#ifndef _PSTL_NUMERIC +#define _PSTL_NUMERIC #include "internal/pstl_config.h" -#if __PSTL_EXECUTION_POLICIES_DEFINED +#if _PSTL_EXECUTION_POLICIES_DEFINED // If has already been included, pull in implementations # include "internal/glue_numeric_impl.h" #else // Otherwise just pull in forward declarations # include "internal/glue_numeric_defs.h" -# define __PSTL_NUMERIC_FORWARD_DECLARED 1 +# define _PSTL_NUMERIC_FORWARD_DECLARED 1 #endif -#endif /* __PSTL_numeric */ +#endif /* _PSTL_NUMERIC */ Index: test/std/algorithms/alg.merge/inplace_merge.pass.cpp =================================================================== --- test/std/algorithms/alg.merge/inplace_merge.pass.cpp +++ test/std/algorithms/alg.merge/inplace_merge.pass.cpp @@ -25,8 +25,8 @@ 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 _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 void operator()(pstl::execution::unsequenced_policy, BiDirIt1 first1, BiDirIt1 last1, BiDirIt1 first2, BiDirIt1 last2, Index: test/std/algorithms/alg.merge/merge.pass.cpp =================================================================== --- test/std/algorithms/alg.merge/merge.pass.cpp +++ test/std/algorithms/alg.merge/merge.pass.cpp @@ -107,7 +107,7 @@ test_merge_by_type([](size_t v) { return (v % 2 == 0 ? v : -v) * 3; }, [](size_t v) { return v * 2; }); test_merge_by_type([](size_t v) { return float64_t(v); }, [](size_t v) { return float64_t(v - 100); }); -#if !__PSTL_ICC_16_17_TEST_64_TIMEOUT +#if !_PSTL_ICC_16_17_TEST_64_TIMEOUT test_merge_by_type>([](size_t v) { return Wrapper(v % 100); }, [](size_t v) { return Wrapper(v % 10); }); #endif Index: test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp +++ test/std/algorithms/alg.modifying.operations/alg.copy/copy_if.pass.cpp @@ -24,7 +24,7 @@ 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 _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN // dummy specializations to skip testing in case of broken configuration template void @@ -135,11 +135,11 @@ test(-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 !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN test(Number(42, OddTag()), IsMultiple(3, OddTag()), [](int32_t j) { return Number(j, OddTag()); }); #endif -#if !__PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN test(-666, [](const int32_t& x) { return true; }, [](size_t j) { return j; }, false); #endif Index: test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp +++ test/std/algorithms/alg.modifying.operations/alg.partitions/is_partitioned.pass.cpp @@ -24,7 +24,7 @@ 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 _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN template void @@ -93,7 +93,7 @@ test([](const float64_t x) { return x < 0; }); test([](const int32_t x) { return x > 1000; }); test([](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 !_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN && !_PSTL_ICC_19_TEST_IS_PARTITIONED_RELEASE_BROKEN test>([](const LocalWrapper& x) { return true; }); #endif Index: test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp +++ test/std/algorithms/alg.modifying.operations/alg.partitions/partition.pass.cpp @@ -68,8 +68,8 @@ 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 specializations to skip testing 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 //dummy specializations to skip testing in case of broken configuration template void operator()(pstl::execution::unsequenced_policy, BiDirIt first, BiDirIt last, BiDirIt exp_first, BiDirIt exp_last, @@ -83,7 +83,7 @@ BiDirIt exp_last, Size n, UnaryOp unary_op, Generator generator) { } -#elif __PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN //dummy specializations to skip testing in case of broken configuration +#elif _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN //dummy specializations to skip testing in case of broken configuration template void operator()(pstl::execution::parallel_policy, BiDirIt first, BiDirIt last, BiDirIt exp_first, BiDirIt exp_last, @@ -168,7 +168,7 @@ int32_t main() { -#if !__PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN test_by_type([](int32_t i) { return i; }, [](int32_t) { return true; }); #endif test_by_type([](int32_t i) { return -i; }, [](const float64_t x) { return x < 0; }); Index: test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp +++ test/std/algorithms/alg.modifying.operations/alg.partitions/partition_copy.pass.cpp @@ -44,7 +44,7 @@ } //dummy specialization by iterator type and policy type, in case of broken configuration -#if __PSTL_ICC_1800_TEST_MONOTONIC_RELEASE_64_BROKEN +#if _PSTL_ICC_1800_TEST_MONOTONIC_RELEASE_64_BROKEN template void operator()(pstl::execution::unsequenced_policy, std::reverse_iterator first, @@ -106,7 +106,7 @@ { test([](const int32_t value) { return value % 2; }); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN test([](const int32_t value) { return true; }); #endif Index: test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp +++ test/std/algorithms/alg.modifying.operations/alg.reverse/reverse.pass.cpp @@ -25,8 +25,8 @@ struct test_one_policy { -#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 +#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 std::enable_if::value, void>::type operator()(pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, @@ -99,7 +99,7 @@ test(); test(); test(); -#if !__PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN +#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN test>(); #endif Index: test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp +++ test/std/algorithms/alg.modifying.operations/alg.reverse/reverse_copy.pass.cpp @@ -65,8 +65,8 @@ 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 || \ - __PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN // 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 // dummy specialization by policy type, in case of broken configuration template typename std::enable_if::value, void>::type operator()(pstl::execution::unsequenced_policy, Iterator1 actual_b, Iterator1 actual_e) Index: test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp +++ test/std/algorithms/alg.modifying.operations/copy_move.pass.cpp @@ -26,8 +26,8 @@ struct run_copy { -#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 _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 void operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first, @@ -79,8 +79,8 @@ struct run_move { -#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 _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 void operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first, @@ -122,8 +122,8 @@ struct run_move> { -#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 _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 void operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first, @@ -195,7 +195,7 @@ test(-666, [](size_t j) { return int32_t(j); }); test>(Wrapper(-666.0), [](int32_t j) { return Wrapper(j); }); -#if !__PSTL_ICC_16_17_TEST_64_TIMEOUT +#if !_PSTL_ICC_16_17_TEST_64_TIMEOUT test(-666.0, [](size_t j) { return float64_t(j); }); test(Number(42, OddTag()), [](int32_t j) { return Number(j, OddTag()); }); #endif Index: test/std/algorithms/alg.modifying.operations/remove.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/remove.pass.cpp +++ test/std/algorithms/alg.modifying.operations/remove.pass.cpp @@ -24,8 +24,8 @@ struct run_remove { -#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 _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 void operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first, @@ -62,8 +62,8 @@ struct run_remove_if { -#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 _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 void operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first, @@ -136,7 +136,7 @@ int32_t main() { -#if !__PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN +#if !_PSTL_ICC_18_TEST_EARLY_EXIT_MONOTONIC_RELEASE_BROKEN test(666, 42, [](int32_t val) { return true; }, [](size_t j) { return j; }); #endif @@ -145,7 +145,7 @@ test(-666.0, 8.5, [](const float64_t& val) { return val != 8.5; }, [](size_t j) { return ((j + 1) % 7 & 2) != 0 ? 8.5 : float64_t(j % 32 + j); }); -#if !__PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN +#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN test(Number(-666, OddTag()), Number(42, OddTag()), IsMultiple(3, OddTag()), [](int32_t j) { return Number(j, OddTag()); }); #endif Index: test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp +++ test/std/algorithms/alg.modifying.operations/replace_copy.pass.cpp @@ -96,7 +96,7 @@ test(-666, 42, 99, [](const int32_t& x) { return x != 42; }, [](size_t j) { return ((j + 1) % 5 & 2) != 0 ? 42 : -1 - int32_t(j); }); -#if !__PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN +#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN test(Number(42, OddTag()), Number(2001, OddTag()), Number(2017, OddTag()), IsMultiple(3, OddTag()), [](int32_t j) { return ((j + 1) % 3 & 2) != 0 ? Number(2001, OddTag()) : Number(j, OddTag()); }); #endif Index: test/std/algorithms/alg.modifying.operations/rotate.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/rotate.pass.cpp +++ test/std/algorithms/alg.modifying.operations/rotate.pass.cpp @@ -78,8 +78,8 @@ 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 specializations to skip testing 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 // dummy specializations to skip testing in case of broken configuration template void operator()(pstl::execution::unsequenced_policy, Iterator data_b, Iterator data_e, Iterator actual_b, Index: test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp +++ test/std/algorithms/alg.modifying.operations/rotate_copy.pass.cpp @@ -73,8 +73,8 @@ 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 _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 std::enable_if::value, void>::type operator()(pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, Index: test/std/algorithms/alg.modifying.operations/unique.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/unique.pass.cpp +++ test/std/algorithms/alg.modifying.operations/unique.pass.cpp @@ -24,8 +24,8 @@ struct run_unique { -#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 _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 void operator()(pstl::execution::unsequenced_policy, ForwardIt first1, ForwardIt last1, ForwardIt first2, @@ -142,7 +142,7 @@ int32_t main() { -#if !__PSTL_ICC_16_17_18_TEST_UNIQUE_MASK_RELEASE_BROKEN +#if !_PSTL_ICC_16_17_18_TEST_UNIQUE_MASK_RELEASE_BROKEN test([](size_t j) { return j / 3; }, [](const int32_t& val1, const int32_t& val2) { return val1 * val1 == val2 * val2; }); test([](size_t) { return float64_t(1); }, Index: test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp =================================================================== --- test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp +++ test/std/algorithms/alg.modifying.operations/unique_copy_equal.pass.cpp @@ -24,7 +24,7 @@ struct run_unique_copy { -#if __PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN // dummy specializations to skip testing in case of broken configuration +#if _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN // dummy specializations to skip testing in case of broken configuration template void @@ -126,7 +126,7 @@ test(float32_t(42), std::equal_to(), [](int32_t j) { return float32_t(5 * j / 23 ^ (j / 7)); }); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN test(float32_t(42), [](float32_t x, float32_t y) { return false; }, [](int32_t j) { return float32_t(j); }, false); #endif Index: test/std/algorithms/alg.nonmodifying/all_of.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/all_of.pass.cpp +++ test/std/algorithms/alg.nonmodifying/all_of.pass.cpp @@ -109,7 +109,7 @@ test(8 * sizeof(int32_t)); test(8 * sizeof(uint16_t)); test(53); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN test(1); #endif Index: test/std/algorithms/alg.nonmodifying/any_of.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/any_of.pass.cpp +++ test/std/algorithms/alg.nonmodifying/any_of.pass.cpp @@ -95,7 +95,7 @@ test(8 * sizeof(int32_t)); test(8 * sizeof(uint16_t)); test(53); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN test(1); #endif Index: test/std/algorithms/alg.nonmodifying/count.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/count.pass.cpp +++ test/std/algorithms/alg.nonmodifying/count.pass.cpp @@ -97,7 +97,7 @@ main() { test(42, IsEqual(50, OddTag()), [](int32_t j) { return j; }); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_RELEASE_BROKEN test(42, [](const int32_t& x) { return true; }, [](int32_t j) { return j; }); #endif test(42, IsEqual(50, OddTag()), [](int32_t j) { return float64_t(j); }); Index: test/std/algorithms/alg.nonmodifying/equal.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/equal.pass.cpp +++ test/std/algorithms/alg.nonmodifying/equal.pass.cpp @@ -159,7 +159,7 @@ test(8 * sizeof(int32_t)); test(8 * sizeof(uint16_t)); test(53); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN test(1); #endif test(256); Index: test/std/algorithms/alg.nonmodifying/find.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/find.pass.cpp +++ test/std/algorithms/alg.nonmodifying/find.pass.cpp @@ -24,8 +24,8 @@ struct test_find { -#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 _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 void operator()(pstl::execution::unsequenced_policy, Iterator first, Iterator last, Value value) Index: test/std/algorithms/alg.nonmodifying/find_end.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/find_end.pass.cpp +++ test/std/algorithms/alg.nonmodifying/find_end.pass.cpp @@ -23,8 +23,8 @@ 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 _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 void operator()(pstl::execution::unsequenced_policy, Iterator1 b, Iterator1 e, Iterator2 bsub, Iterator2 esub, @@ -115,7 +115,7 @@ test(8 * sizeof(int32_t)); test(8 * sizeof(uint16_t)); test(53); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN test(1); #endif Index: test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp +++ test/std/algorithms/alg.nonmodifying/find_first_of.pass.cpp @@ -23,8 +23,8 @@ 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 _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 void operator()(pstl::execution::unsequenced_policy, Iterator1 b, Iterator1 e, Iterator2 bsub, Iterator2 esub, Index: test/std/algorithms/alg.nonmodifying/find_if.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/find_if.pass.cpp +++ test/std/algorithms/alg.nonmodifying/find_if.pass.cpp @@ -24,8 +24,8 @@ struct test_find_if { -#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 _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 void operator()(pstl::execution::unsequenced_policy, Iterator first, Iterator last, Predicate pred, @@ -95,7 +95,7 @@ int32_t main() { -#if !__PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN +#if !_PSTL_ICC_17_TEST_MAC_RELEASE_32_BROKEN // Note that the "hit" and "miss" functions here avoid overflow issues. test(IsMultiple(5, OddTag()), [](int32_t j) { return Number(j - j % 5, OddTag()); }, // hit [](int32_t j) { return Number(j % 5 == 0 ? j ^ 1 : j, OddTag()); }); // miss Index: test/std/algorithms/alg.nonmodifying/none_of.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/none_of.pass.cpp +++ test/std/algorithms/alg.nonmodifying/none_of.pass.cpp @@ -93,7 +93,7 @@ test(8 * sizeof(int32_t)); test(8 * sizeof(uint16_t)); test(53); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN test(1); #endif Index: test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp +++ test/std/algorithms/alg.nonmodifying/nth_element.pass.cpp @@ -73,8 +73,8 @@ 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 _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 std::enable_if::value, void>::type operator()(pstl::execution::unsequenced_policy, Iterator1 first1, Iterator1 last1, Iterator1 first2, Index: test/std/algorithms/alg.nonmodifying/search_n.pass.cpp =================================================================== --- test/std/algorithms/alg.nonmodifying/search_n.pass.cpp +++ test/std/algorithms/alg.nonmodifying/search_n.pass.cpp @@ -23,8 +23,8 @@ 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 _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 void operator()(pstl::execution::unsequenced_policy, Iterator b, Iterator e, Size count, const T& value, Predicate pred) @@ -101,7 +101,7 @@ test(); test(); test(); -#if !__PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN +#if !_PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN test(); #endif Index: test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp =================================================================== --- test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp +++ test/std/algorithms/alg.sorting/alg.heap.operations/is_heap.pass.cpp @@ -38,8 +38,8 @@ struct test_is_heap { -#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 _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 std::enable_if::value, void>::type operator()(pstl::execution::unsequenced_policy, Iterator first, Iterator last, Predicate pred) Index: test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp =================================================================== --- test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp +++ test/std/algorithms/alg.sorting/alg.lex.comparison/lexicographical_compare.pass.cpp @@ -165,7 +165,7 @@ { test(std::less()); test(std::greater()); -#if !__PSTL_ICC_18_TEST_EARLY_EXIT_AVX_RELEASE_BROKEN +#if !_PSTL_ICC_18_TEST_EARLY_EXIT_AVX_RELEASE_BROKEN test([](const float64_t x, const int32_t y) { return x * x < y * y; }); #endif test, LocalWrapper>( Index: test/std/algorithms/alg.sorting/partial_sort.pass.cpp =================================================================== --- test/std/algorithms/alg.sorting/partial_sort.pass.cpp +++ test/std/algorithms/alg.sorting/partial_sort.pass.cpp @@ -86,7 +86,7 @@ if (m1 - first > 1) { auto complex = std::ceil(n * std::log(float32_t(m1 - first))); -#if defined(__PSTL_PAR_BACKEND_TBB) +#if defined(_PSTL_PAR_BACKEND_TBB) auto p = tbb::this_task_arena::max_concurrency(); #else auto p = 1; Index: test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp =================================================================== --- test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp +++ test/std/algorithms/alg.sorting/partial_sort_copy.pass.cpp @@ -59,8 +59,8 @@ : d_first(b1), d_last(e1), exp_first(b2), exp_last(e2) { } -#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 _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 void operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, Size n1, Size n2, Index: test/std/numerics/numeric.ops/adjacent_difference.pass.cpp =================================================================== --- test/std/numerics/numeric.ops/adjacent_difference.pass.cpp +++ test/std/numerics/numeric.ops/adjacent_difference.pass.cpp @@ -97,8 +97,8 @@ 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 _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 std::enable_if::value, void>::type operator()(pstl::execution::unsequenced_policy, Iterator1 data_b, Iterator1 data_e, Iterator2 actual_b, Index: test/std/numerics/numeric.ops/reduce.pass.cpp =================================================================== --- test/std/numerics/numeric.ops/reduce.pass.cpp +++ test/std/numerics/numeric.ops/reduce.pass.cpp @@ -57,7 +57,7 @@ struct test_two_short_forms { -#if __PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN //dummy specialization by policy type, in case of broken configuration +#if _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN //dummy specialization by policy type, in case of broken configuration template void operator()(pstl::execution::parallel_policy, Iterator first, Iterator last, Sum init, Sum expected) Index: test/std/numerics/numeric.ops/scan.pass.cpp =================================================================== --- test/std/numerics/numeric.ops/scan.pass.cpp +++ test/std/numerics/numeric.ops/scan.pass.cpp @@ -187,7 +187,7 @@ for (int32_t mode = 0; mode < 2; ++mode) { inclusive = mode != 0; -#if !__PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN +#if !_PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN // Test with highly restricted type and associative but not commutative operation test_matrix, Matrix2x2>(Matrix2x2(), multiply_matrix, Matrix2x2(-666, 666)); Index: test/std/numerics/numeric.ops/transform_scan.pass.cpp =================================================================== --- test/std/numerics/numeric.ops/transform_scan.pass.cpp +++ test/std/numerics/numeric.ops/transform_scan.pass.cpp @@ -168,7 +168,7 @@ for (int32_t mode = 0; mode < 2; ++mode) { inclusive = mode != 0; -#if !__PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN +#if !_PSTL_ICC_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN test_matrix, Matrix2x2>([](const Matrix2x2 x) { return x; }, Matrix2x2(), multiply_matrix, Matrix2x2(-666, 666)); Index: test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp =================================================================== --- test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp +++ test/std/utilities/memory/specialized.algorithms/uninitialized_construct.pass.cpp @@ -112,7 +112,7 @@ { // for user-defined types -#if !__PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN +#if !_PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN test_uninit_construct_by_type>(); test_uninit_construct_by_type>>(); #endif Index: test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp =================================================================== --- test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp +++ test/std/utilities/memory/specialized.algorithms/uninitialized_copy_move.pass.cpp @@ -76,7 +76,7 @@ std::destroy_n(exec, out_first, n); } -#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 template void operator()(pstl::execution::unsequenced_policy, InputIterator first, InputIterator last, OutputIterator out_first, @@ -138,8 +138,8 @@ test_uninitialized_copy_move_by_type(); // 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 && \ - !__PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_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>(); #endif Index: test/support/pstl_test_config.h =================================================================== --- test/support/pstl_test_config.h +++ test/support/pstl_test_config.h @@ -7,43 +7,43 @@ // //===----------------------------------------------------------------------===// -#ifndef __PSTL_TEST_config_H -#define __PSTL_TEST_config_H +#ifndef _PSTL_TEST_config_H +#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. #endif -#define __PSTL_ICC_16_17_TEST_REDUCTION_BOOL_TYPE_RELEASE_64_BROKEN \ +#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 \ +#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 \ +#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 \ +#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 \ +#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 \ +#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 \ +#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 \ - (__PSTL_USE_PAR_POLICIES && ((_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 \ +#define _PSTL_ICC_16_VC14_TEST_PAR_TBB_RT_RELEASE_64_BROKEN \ + (_PSTL_USE_PAR_POLICIES && ((_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 \ +#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 \ +#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 \ +#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_19_TEST_SIMD_UDS_WINDOWS_RELEASE_BROKEN (__INTEL_COMPILER == 1900 && _MSC_VER && !_DEBUG) -#endif /* __PSTL_TEST_config_H */ +#endif /* _PSTL_TEST_config_H */ Index: test/support/utils.h =================================================================== --- test/support/utils.h +++ test/support/utils.h @@ -572,7 +572,7 @@ T a[2][2]; Matrix2x2() : a{{1, 0}, {0, 1}} {} Matrix2x2(T x, T y) : a{{0, x}, {x, y}} {} -#if !__PSTL_ICL_19_VC14_VC141_TEST_SCAN_RELEASE_BROKEN +#if !_PSTL_ICL_19_VC14_VC141_TEST_SCAN_RELEASE_BROKEN Matrix2x2(const Matrix2x2& m) : a{{m.a[0][0], m.a[0][1]}, {m.a[1][0], m.a[1][1]}} {} Matrix2x2& operator=(const Matrix2x2& m) @@ -607,9 +607,9 @@ } // Check that Intel(R) Threading Building Blocks header files are not used when parallel policies are off -#if !__PSTL_USE_PAR_POLICIES +#if !_PSTL_USE_PAR_POLICIES #if defined(TBB_INTERFACE_VERSION) -#error The parallel backend is used while it should not (__PSTL_USE_PAR_POLICIES==0) +#error The parallel backend is used while it should not (_PSTL_USE_PAR_POLICIES==0) #endif #endif @@ -658,7 +658,7 @@ iterator_type operator()(Iterator it) { -#if __PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT +#if _PSTL_CPP14_MAKE_REVERSE_ITERATOR_PRESENT return std::make_reverse_iterator(it); #else return iterator_type(it); @@ -1051,7 +1051,7 @@ // Try static execution policies invoke_on_all_iterator_types()(seq, op, std::forward(rest)...); invoke_on_all_iterator_types()(unseq, op, std::forward(rest)...); -#if __PSTL_USE_PAR_POLICIES +#if _PSTL_USE_PAR_POLICIES invoke_on_all_iterator_types()(par, op, std::forward(rest)...); invoke_on_all_iterator_types()(par_unseq, op, std::forward(rest)...); #endif @@ -1200,7 +1200,7 @@ static const char* done() { -#if __PSTL_TEST_SUCCESSFUL_KEYWORD +#if _PSTL_TEST_SUCCESSFUL_KEYWORD return "done"; #else return "passed"; @@ -1237,7 +1237,7 @@ static void invoke_if(Policy&& p, F f) { -#if __PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || __PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN +#if _PSTL_ICC_16_VC14_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN || _PSTL_ICC_17_VC141_TEST_SIMD_LAMBDA_DEBUG_32_BROKEN __pstl::__internal::invoke_if_not(__pstl::__internal::allow_unsequenced(), f); #else f();