29 template <
typename A,
typename B>
30 value_t<A>
dot(
const A& a,
const B& b) {
31 if constexpr (all_dma<A, B>) {
32 a.ensure_cpu_up_to_date();
33 b.ensure_cpu_up_to_date();
35 if constexpr (all_single_precision<A, B>) {
36 return cblas_sdot(etl::size(a), a.memory_start(), 1, b.memory_start(), 1);
38 return cblas_ddot(etl::size(a), a.memory_start(), 1, b.memory_start(), 1);
41 cpp_unreachable(
"BLAS not enabled/available");
53 template <
typename A,
typename B>
55 cpp_unreachable(
"BLAS not enabled/available");
value_t< A > dot(const A &a, const B &b)
Returns the dot product of the two given expressions.
Definition: expression_builder.hpp:594
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81