Upload files to "ex1D_kahan_summation"
This commit is contained in:
parent
c70572f1b9
commit
9098bcc99a
3 changed files with 97 additions and 0 deletions
30
ex1D_kahan_summation/mylib.h
Normal file
30
ex1D_kahan_summation/mylib.h
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#ifndef FILE_MYLIB
|
||||
#define FILE_MYLIB
|
||||
#include <vector>
|
||||
|
||||
/** Inner product
|
||||
@param[in] x vector
|
||||
@param[in] y vector
|
||||
@return resulting Euclidian inner product <x,y>
|
||||
*/
|
||||
double scalar(std::vector<double> const &x, std::vector<double> const &y);
|
||||
|
||||
/** Inner product using BLAS routines
|
||||
@param[in] x vector
|
||||
@param[in] y vector
|
||||
@return resulting Euclidian inner product <x,y>
|
||||
*/
|
||||
double scalar_cblas(std::vector<double> const &x, std::vector<double> const &y);
|
||||
float scalar_cblas(std::vector<float> const &x, std::vector<float> const &y);
|
||||
|
||||
|
||||
/** L_2 Norm of a vector
|
||||
@param[in] x vector
|
||||
@return resulting Euclidian norm <x,y>
|
||||
*/
|
||||
double norm(std::vector<double> const &x);
|
||||
|
||||
double Kahan_skalar(std::vector<double> const &x, std::vector<double> const &y);
|
||||
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue