* means to load the calling vector @p this twice. Since most vector
* operations are memory transfer limited, this reduces the time by 25\% (or
* 50\% if @p W equals @p this).
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
value_type add_and_dot (const value_type a,
const BlockVectorBase &V,
* calling separate methods means to load the calling vector @p this
* twice. Since most vector operations are memory transfer limited, this
* reduces the time by 25\% (or 50\% if @p W equals @p this).
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
virtual Number add_and_dot(const Number a,
const VectorSpaceVector<Number> &V,
* separate methods means to load the calling vector @p this twice. Since
* most vector operations are memory transfer limited, this reduces the
* time by 25\% (or 50\% if @p W equals @p this).
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
virtual Number add_and_dot(const Number a,
const VectorSpaceVector<Number> &V,
* separate methods means to load the calling vector @p this twice. Since
* most vector operations are memory transfer limited, this reduces the
* time by 25\% (or 50\% if @p W equals @p this).
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
virtual Number add_and_dot(const Number a,
const VectorSpaceVector<Number> &V,
/**
* Local part of the addition followed by an inner product of two
- * vectors.
+ * vectors. The same applies for complex-valued vectors as for
+ * the add_and_dot() function.
*/
Number add_and_dot_local (const Number a,
const Vector<Number> &V,
* this->add(a, V);
* return_value = *this * W;
* @endcode
+ *
+ * The reason this function exists is that this operation involves less
+ * memory transfer than calling the two functions separately. This method
+ * only needs to load three vectors, @p this, @p V, @p W, whereas calling
+ * separate methods means to load the calling vector @p this twice. Since
+ * most vector operations are memory transfer limited, this reduces the time
+ * by 25\% (or 50\% if @p W equals @p this).
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
virtual Number add_and_dot(const Number a,
const VectorSpaceVector<Number> &V,
* transfer. However, for PETSc vectors such a combined operation is not
* natively supported and thus the cost is completely equivalent as
* calling the two methods separately.
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
PetscScalar add_and_dot (const PetscScalar a,
const VectorBase &V,
* reduces the time by 25\% (or 50\% if @p W equals @p this).
*
* The vectors need to have the same layout.
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
virtual double add_and_dot(const double a,
const VectorSpaceVector<double> &V,
* transfer. However, for Trilinos vectors such a combined operation is
* not natively supported and thus the cost is completely equivalent as
* calling the two methods separately.
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
TrilinosScalar add_and_dot (const TrilinosScalar a,
const Vector &V,
* most vector operations are memory transfer limited, this reduces the time
* by 25\% (or 50\% if @p W equals @p this).
*
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
+ *
* @dealiiOperationIsMultithreaded The algorithm uses pairwise summation
* with the same order of summation in every run, which gives fully
* repeatable results from one run to another.
*/
- Number add_and_dot (const Number a,
- const Vector<Number> &V,
- const Vector<Number> &W);
+ Number
+ add_and_dot (const Number a,
+ const Vector<Number> &V,
+ const Vector<Number> &W);
//@}
* separate methods means to load the calling vector @p this twice. Since
* most vector operations are memory transfer limited, this reduces the
* time by 25\% (or 50\% if @p W equals @p this).
+ *
+ * For complex-valued vectors, the scalar product in the second step is implemented as
+ * $\left<v,w\right>=\sum_i v_i \bar{w_i}$.
*/
virtual Number add_and_dot(const Number a,
const VectorSpaceVector<Number> &V,