Pushing everything again, accidentally deleted my remote repository
This commit is contained in:
commit
1bee3e8e5b
101 changed files with 9428 additions and 0 deletions
55
ex5/ex5_4/benchmarks.h
Normal file
55
ex5/ex5_4/benchmarks.h
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
/** (A) Inner product of two vectors (from skalar_stl)
|
||||
@param[in] x vector
|
||||
@param[in] y vector
|
||||
@return resulting Euclidian inner product <x,y>
|
||||
*/
|
||||
double scalar_parallel(vector<double> const &x, vector<double> const &y);
|
||||
|
||||
|
||||
/** (A) Sum entries of vector
|
||||
@param[in] x vector
|
||||
@return sum
|
||||
*/
|
||||
double sum(vector<double> const &x);
|
||||
|
||||
|
||||
/** (B) Matrix-vector product (from intro_vector_densematrix)
|
||||
* @param[in] A dense matrix (1D access)
|
||||
* @param[in] u vector
|
||||
*
|
||||
* @return resulting vector
|
||||
*/
|
||||
vector<double> MatVec_parallel(vector<double> const &A, vector<double> const &x);
|
||||
|
||||
|
||||
/** (C) Matrix-matrix product
|
||||
* @param[in] A MxL dense matrix (1D access)
|
||||
* @param[in] B LxN dense matrix (1D access)
|
||||
* @param[in] shared_dim shared dimension L
|
||||
*
|
||||
* @return resulting MxN matrix
|
||||
*/
|
||||
vector<double> MatMat_parallel(vector<double> const &A, vector<double> const &B, size_t const &shared_dim);
|
||||
|
||||
|
||||
/** (D) Evaluation of a polynomial function using Horner's scheme
|
||||
* @param[in] a coefficient vector
|
||||
* @param[in] x vector with input values
|
||||
*
|
||||
* @return vector with output values
|
||||
*/
|
||||
vector<double> poly_parallel(vector<double> const &a, vector<double> const &x);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue