32 template <
typename A,
typename B>
45 #ifdef ETL_MANUAL_SELECT 53 template <
typename A,
typename B>
62 std::cerr <<
"Forced selection to CUBLAS dot implementation, but not possible for this expression" << std::endl;
63 return select_default_dot_impl<A, B>();
71 std::cerr <<
"Forced selection to BLAS dot implementation, but not possible for this expression" << std::endl;
72 return select_default_dot_impl<A, B>();
79 if (!
vec_enabled || !decay_traits<A>::template vectorizable<vector_mode> || !decay_traits<B>::template vectorizable<vector_mode>) {
80 std::cerr <<
"Forced selection to VEC dot implementation, but not possible for this expression" << std::endl;
81 return select_default_dot_impl<A, B>();
92 return select_default_dot_impl<A, B>();
103 template <
typename A,
typename B>
105 return select_default_dot_impl<A, B>();
120 template <
typename A,
typename B>
122 constexpr_select
auto impl = select_dot_impl<A, B>();
127 return etl::impl::blas::dot(a, b);
132 return etl::impl::cublas::dot(a, b);
137 return etl::impl::vec::dot(a, b);
141 return etl::impl::standard::dot(a, b);
CUBLAS implementation of the dot product.
constexpr bool vec_enabled
Indicates if vectorization is available in any format.
Definition: config.hpp:220
Definition: expression_builder.hpp:699
Standard implementation of the "dot" reduction.
dot_impl
Enumeration describing the different implementations of dot.
Definition: dot_impl.hpp:20
context & local_context()
Return the configuration context of the current thread.
Definition: context.hpp:50
constexpr bool cublas_enabled
Indicates if the NVIDIA CUBLAS library is available for ETL.
Definition: config.hpp:99
static value_t< A > apply(const A &a, const B &b)
Apply the functor to a and b.
Definition: dot.hpp:121
typename default_intrinsic_traits< T >::intrinsic_type default_intrinsic_type
Helper to get the intrinsic corresponding type of a vectorizable type.
Definition: vectorization.hpp:256
Unified vectorized implementation of the "dot" reduction.
Functor for dot product.
Definition: dot.hpp:113
constexpr bool cblas_enabled
Indicates if a BLAS library is available for ETL.
Definition: config.hpp:76
BLAS implementation of the "dot" reduction.
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25