diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2024-12-05 10:49:03 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2024-12-05 11:21:12 +0300 |
commit | 681668b400e84754eb7acbc0e173491bb4dfc8b2 (patch) | |
tree | e809b0abb22e9c506c032e256effebcf9ea88dbd /contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends | |
parent | fe60cde3cf1989964159845c2929a65056a8dcf3 (diff) | |
download | ydb-681668b400e84754eb7acbc0e173491bb4dfc8b2.tar.gz |
Update libcxx to 18 Dec 3b0705827dbe711788c6b6bec3afa94205db1ce8
commit_hash:875d8582c26b8bf016af25e00ad77d9bbf081948
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends')
-rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h index a5ca9c89d1..ab2e3172b8 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h +++ b/contrib/libs/cxxsupp/libcxx/include/__algorithm/pstl_backends/cpu_backends/transform_reduce.h @@ -29,12 +29,14 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template < - typename _DifferenceType, - typename _Tp, - typename _BinaryOperation, - typename _UnaryOperation, - __enable_if_t<__is_trivial_plus_operation<_BinaryOperation, _Tp, _Tp>::value && is_arithmetic_v<_Tp>, int> = 0> +template <typename _DifferenceType, + typename _Tp, + typename _BinaryOperation, + typename _UnaryOperation, + typename _UnaryResult = invoke_result_t<_UnaryOperation, _DifferenceType>, + __enable_if_t<__desugars_to<__plus_tag, _BinaryOperation, _Tp, _UnaryResult>::value && is_arithmetic_v<_Tp> && + is_arithmetic_v<_UnaryResult>, + int> = 0> _LIBCPP_HIDE_FROM_ABI _Tp __simd_transform_reduce(_DifferenceType __n, _Tp __init, _BinaryOperation, _UnaryOperation __f) noexcept { _PSTL_PRAGMA_SIMD_REDUCTION(+ : __init) @@ -43,12 +45,14 @@ __simd_transform_reduce(_DifferenceType __n, _Tp __init, _BinaryOperation, _Unar return __init; } -template < - typename _Size, - typename _Tp, - typename _BinaryOperation, - typename _UnaryOperation, - __enable_if_t<!(__is_trivial_plus_operation<_BinaryOperation, _Tp, _Tp>::value && is_arithmetic_v<_Tp>), int> = 0> +template <typename _Size, + typename _Tp, + typename _BinaryOperation, + typename _UnaryOperation, + typename _UnaryResult = invoke_result_t<_UnaryOperation, _Size>, + __enable_if_t<!(__desugars_to<__plus_tag, _BinaryOperation, _Tp, _UnaryResult>::value && + is_arithmetic_v<_Tp> && is_arithmetic_v<_UnaryResult>), + int> = 0> _LIBCPP_HIDE_FROM_ABI _Tp __simd_transform_reduce(_Size __n, _Tp __init, _BinaryOperation __binary_op, _UnaryOperation __f) noexcept { const _Size __block_size = __lane_size / sizeof(_Tp); |