33 #ifndef BLAS_VEC_INTERFACE_H_
34 #define BLAS_VEC_INTERFACE_H_
48 template<
typename vector_t>
49 inline void VecScaleAssign(vector_t &dest,
double alpha1,
const vector_t &v1)
51 for(
size_t i=0; i<dest.size(); i++)
57 template<
typename vector_t>
58 inline void VecAssign(vector_t &dest,
const vector_t &v1)
60 for(
size_t i=0; i<dest.size(); i++)
66 template<
typename vector_t>
67 inline void VecScaleAdd(vector_t &dest,
double alpha1,
const vector_t &v1,
double alpha2,
const vector_t &v2);
70 template<
typename vector_t>
71 inline void VecScaleAdd(vector_t &dest,
double alpha1,
const vector_t &v1,
double alpha2,
const vector_t &v2,
double alpha3,
const vector_t &v3);
75 template<
typename vector_t>
76 inline void VecAdd(vector_t &dest, vector_t &v);
79 template<
typename vector_t>
86 template<
typename vector_t>
87 inline void VecProdAdd(
const vector_t &a,
const vector_t &b,
double &sum)
89 for(
size_t i=0; i<a.size(); i++)
VecProdAdd(a[i], b[i], sum);
93 template<
typename vector_t>
94 inline double VecProd(
const vector_t &a,
const vector_t &b)
104 template<
typename vector_t>
111 template<
typename vector_t>
void VecScaleAdd(vector_t &dest, double alpha1, const vector_t &v1, double alpha2, const vector_t &v2)
calculates dest = alpha1*v1 + alpha2*v2
void VecAdd(vector_t &dest, vector_t &v)
calculates dest = dest + v
void VecAssign(vector_t &dest, const vector_t &v1)
calculates dest = v1
Definition: blas_vec_interface.h:58
double VecProd(const vector_t &a, const vector_t &b)
returns scal<a, b>
Definition: blas_vec_interface.h:94
void VecProdAdd(const vector_t &a, const vector_t &b, double &sum)
calculates s += scal<a, b>
Definition: blas_vec_interface.h:87
double VecNormSquared(const vector_t &a, const vector_t &b)
returns norm_2^2(a)
Definition: blas_vec_interface.h:112
void VecSubstract(vector_t &dest, vector_t &v)
calculates dest = dest - v
void VecNormSquaredAdd(const vector_t &a, const vector_t &b, double &sum)
calculates s += norm_2^2(a)
Definition: blas_vec_interface.h:105
void VecScaleAssign(double &dest, double alpha1, const double &v1)
calculates dest = alpha1*v1. for doubles
Definition: blas_vec_interface.h:39