ex5
This commit is contained in:
parent
0386d99307
commit
95b3017475
28 changed files with 5800 additions and 0 deletions
22
ex5/code/task_4.h
Normal file
22
ex5/code/task_4.h
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
vector<double> matrix_vec(vector<double> const &A, vector<double> const &x);
|
||||
vector<double> matrix_matrix(vector<double> const &A, vector<double> const &B, size_t const &M);
|
||||
vector<double> poly(vector<double> const &x, vector<double> const &a);
|
||||
double scalar(vector<double> const &x, vector<double> const &y);
|
||||
double summation(vector<double> const &x);
|
||||
|
||||
void print_performance(double sec, size_t memory, size_t flops, unsigned int size);
|
||||
tuple<vector<double>, vector<double>> init_A(size_t N);
|
||||
tuple<vector<double>, vector<double>> init_B(size_t M, size_t N);
|
||||
tuple<vector<double>, vector<double>> init_C(size_t M, size_t N, size_t L);
|
||||
tuple<vector<double>, vector<double>> init_D(size_t N, size_t p);
|
||||
|
||||
|
||||
void benchmark_A(vector<double> const &x, vector<double> const &y, size_t NLOOPS, bool cblas);
|
||||
void benchmark_B(vector<double> const &A, vector<double> const &x, size_t NLOOPS, bool cblas);
|
||||
void benchmark_C(vector<double> const &A, vector<double> const &B, size_t L, size_t NLOOPS, bool cblas);
|
||||
void benchmark_D(vector<double> const &x, vector<double> const &a, size_t NLOOPS);
|
||||
void benchmark_summation(vector<double> const &x, size_t NLOOPS);
|
||||
Loading…
Add table
Add a link
Reference in a new issue