#include <iostream>
#include <vector>
#include <thread>
#include <random>
#include <chrono>
#include <functional>
#include <algorithm>
#include <omp.h>
|
template<typename T , typename ... Args> |
void | benchmark (const std::string &name, const uint &repeat, std::function< std::vector< T >(const Matrix< T > &, const std::vector< T > &vec, Args... args)> mult, const Matrix< T > &m, const std::vector< T > &v, Args... args) |
| [all] Plus de détails...
|
|
template<typename T > |
std::vector< T > | sequential_mult (const Matrix< T > &mat, const std::vector< T > &vec) |
|
template<typename T > |
std::vector< T > | thread_mult (const Matrix< T > &mat, const std::vector< T > &vec, const int &n_threads) |
|
template<typename T > |
std::vector< T > | openmp_mult (const Matrix< T > &mat, const std::vector< T > &vec, const int n_threads) |
|
int | main (int argc, char *argv[]) |
|
◆ benchmark()
template<typename T , typename ... Args>
void benchmark |
( |
const std::string & |
name, |
|
|
const uint & |
repeat, |
|
|
std::function< std::vector< T >(const Matrix< T > &, const std::vector< T > &vec, Args... args)> |
mult, |
|
|
const Matrix< T > & |
m, |
|
|
const std::vector< T > & |
v, |
|
|
Args... |
args |
|
) |
| |
◆ main()
int main |
( |
int |
argc, |
|
|
char * |
argv[] |
|
) |
| |
◆ openmp_mult()
template<typename T >
std::vector<T> openmp_mult |
( |
const Matrix< T > & |
mat, |
|
|
const std::vector< T > & |
vec, |
|
|
const int |
n_threads |
|
) |
| |
◆ sequential_mult()
template<typename T >
std::vector<T> sequential_mult |
( |
const Matrix< T > & |
mat, |
|
|
const std::vector< T > & |
vec |
|
) |
| |
◆ thread_mult()
template<typename T >
std::vector<T> thread_mult |
( |
const Matrix< T > & |
mat, |
|
|
const std::vector< T > & |
vec, |
|
|
const int & |
n_threads |
|
) |
| |