Morpheus 1.0.0
Dynamic matrix type and algorithms for sparse matrices
Loading...
Searching...
No Matches
Morpheus_WAXPBY.hpp
1
24#ifndef MORPHEUS_WAXPBY_HPP
25#define MORPHEUS_WAXPBY_HPP
26
27#include <impl/Morpheus_WAXPBY_Impl.hpp>
28
29namespace Morpheus {
52template <typename ExecSpace, typename Vector1, typename Vector2,
53 typename Vector3>
54inline void waxpby(const size_t n, const typename Vector1::value_type alpha,
55 const Vector1& x, const typename Vector2::value_type beta,
56 const Vector2& y, Vector3& w) {
57 static_assert(is_dense_vector_format_container_v<Vector1>,
58 "x must be a DenseVector container");
59 static_assert(is_dense_vector_format_container_v<Vector2>,
60 "y must be a DenseVector container");
61 static_assert(is_dense_vector_format_container_v<Vector3>,
62 "w must be a DenseVector container");
63 Impl::waxpby<ExecSpace>(n, alpha, x, beta, y, w);
64}
67} // namespace Morpheus
68
69#endif // MORPHEUS_WAXPBY_HPP
void waxpby(const size_t n, const typename Vector1::value_type alpha, const Vector1 &x, const typename Vector2::value_type beta, const Vector2 &y, Vector3 &w)
Computes the update of a vector with the sum of two scaled vectors where: w = alpha*x + beta*y.
Definition: Morpheus_WAXPBY.hpp:54
Generic Morpheus interfaces.
Definition: dummy.cpp:24