20 namespace InnerProductImpls {
23 template <
typename Lhs,
typename Rhs>
25 static double apply(
const Lhs& lhs,
const Rhs& rhs) noexcept {
31 template <
typename LhsTagsList,
typename RhsTagsList>
33 static double apply(
const Variables<LhsTagsList>& lhs,
34 const Variables<RhsTagsList>& rhs) noexcept {
35 const auto size = lhs.size();
37 "The Variables must be of the same size to take an inner product");
38 return ddot_(size, lhs.data(), 1, rhs.data(), 1);
70 template <
typename Lhs,
typename Rhs>
72 const Rhs& rhs) noexcept {
Includes Blaze library with specific configs.
Functionality for solving linear systems of equations.
Definition: TerminateIfConverged.hpp:22
double ddot_(const size_t &N, const double *X, const size_t &INCX, const double *Y, const size_t &INCY)
Definition: Blas.hpp:46
#define ASSERT(a, m)
Assert that an expression should be true.
Definition: Assert.hpp:49
The inner product between any types that have a dot product.
Definition: InnerProduct.hpp:24
#define SPECTRE_ALWAYS_INLINE
Always inline a function. Only use this if you benchmarked the code.
Definition: ForceInline.hpp:20
double inner_product(const Lhs &lhs, const Rhs &rhs) noexcept
The local part of the Euclidean inner product on the vector space w.r.t. which the addition and scala...
Definition: InnerProduct.hpp:71
Defines macro to always inline a function.
Declares the interfaces for the BLAS used.