22 lines
1.2 KiB
C++
22 lines
1.2 KiB
C++
#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);
|