7#ifndef INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_INNER_PRODUCT_HPP_
8#define INCLUDE_GUARD_ARENE_BASE_ARENE_BASE_ALGORITHM_INNER_PRODUCT_HPP_
16#include "arene/base/algorithm/detail/generalized_transform_reduce.hpp"
17#include "arene/base/algorithm/detail/reduce_policy_move_assign.hpp"
18#include "arene/base/algorithm/detail/synthesize_range1_overload.hpp"
19#include "arene/base/algorithm/detail/traits.hpp"
22#include "arene/base/stdlib_choice/enable_if.hpp"
23#include "arene/base/stdlib_choice/is_assignable.hpp"
24#include "arene/base/stdlib_choice/is_move_constructible.hpp"
25#include "arene/base/stdlib_choice/move.hpp"
26#include "arene/base/stdlib_choice/multiplies.hpp"
27#include "arene/base/stdlib_choice/plus.hpp"
39namespace algorithm_detail {
40namespace inner_product_detail {
43class inner_product_fn {
112 >::value>> =
nullptr>
113 constexpr auto operator()(
119 Multiplies multiplies
123 generalized_transform_reduce,
124 reduce_policy_move_assign<Value>,
134 using policy = reduce_policy_move_assign<Value>;
136 return policy::access(
137 generalized_transform_reduce{}(
205 constexpr auto operator()(
218 std::multiplies<>&&>) -> Value {
239 algorithm_detail::synthesize_range1_overload_t<algorithm_detail::inner_product_detail::inner_product_fn>,
#define ARENE_CPP14_INLINE_VARIABLE(type, name)
Emulates C++17's inline variable declarations for function objects.
Definition cpp14_inline.hpp:69
static constexpr value_type value
Definition integral_constant.hpp:34
Definition accumulate.hpp:37
typename invoke_result< Fn, Args... >::type invoke_result_t
The return type of a functor invoked with the specified arguments.
Definition is_invocable.hpp:271
constexpr bool is_nothrow_invocable_v
Determine if a functor type is no-throw invocable with the specified argument types.
typename iter_reference_detail::iter_reference_impl< Itr >::type iter_reference_t
Determins the reference type of the given iterator.
Definition iter_reference_t.hpp:47
typename constraints_impl::constraints< EnableIfs... >::type constraints
Helper used to express template constraints in a consistent way using std::enable_if_t.
Definition constraints.hpp:51
Definition accumulate.hpp:36
constexpr auto move(T &&value) noexcept -> remove_reference_t< T > &&
Cast a value to an rvalue.
Definition move.hpp:30
typename enable_if< Condition, Type >::type enable_if_t
Type alias to support constraining templates. Is an alias for the specified type if the Condition is ...
Definition enable_if.hpp:41