linbox
|
Benchmarking dense matrix multiplication on finite fields. More...
#include "benchmarks/benchmark.h"
#include "linbox/util/error.h"
#include "fflas-ffpack/fflas-ffpack.h"
#include "linbox/field/modular.h"
#include "linbox/field/modular-balanced.h"
#include "linbox/matrix/random-matrix.h"
#include "linbox/matrix/blas-matrix.h"
#include "linbox/algorithms/blas-domain.h"
#include <iomanip>
Functions | |
bool | keepon (index_t &repet, const Timer &tim, double maxtime=0.2) |
Watches a timer and a number and repet and signals if over. More... | |
bool | whatchon (index_t &repet, Timer &tim, double maxtime=0.5) |
Watches a timer and a number and repet and signals if over. More... | |
void | bench_blas (index_t min, index_t max, int step, int charac) |
Benchmark fgemm Y=AX for several sizes of sqare matrices. More... | |
void | bench_square (index_t min, index_t max, int step, int charac) |
Benchmark square fgemm Y=AX for several fields. More... | |
void | bench_rectangular (index_t k, int charac, index_t l=2) |
Benchmark fgemm Y=AX for several shapes. More... | |
void | bench_scalar (index_t k, int charac, bool inplace) |
Benchmark fgemm ![]() ![]() | |
void | bench_transpose (index_t k, int charac, bool inplace) |
Benchmark fgemm ![]() ![]() | |
int | main (int ac, char **av) |
Benchmarking dense matrix multiplication on finite fields.
This file benchmarks the FFLAS::fgemm implementation for various fields, shape and parameters. Actually, we use the wrapper member mul
of LinBox::BlasMatrixDomain.
bool keepon | ( | index_t & | repet, |
const Timer & | tim, | ||
double | maxtime = 0.2 |
||
) |
Watches a timer and a number and repet and signals if over.
We want at least 2 repetions but not more than maxtime spent on timing.
repet | number of previous repetitions. Should be 0 on the first time whatchon is called. |
tim | timer to watch |
maxtime | maximum time (in seconds) until keepon tells stop. |
true
if we conditions are not met to stop, false
otherwise. tim
was clear at the beginning and never started. bool whatchon | ( | index_t & | repet, |
Timer & | tim, | ||
double | maxtime = 0.5 |
||
) |
Watches a timer and a number and repet and signals if over.
We want at least 2 repetions but not more than maxtime spent on timing.
repet | number of previous repetitions. Should be 0 on the first time whatchon is called. |
tim | timer to watch |
maxtime | maximum time (in seconds) until watchon tells stop. |
true
if we conditions are not met to stop, false
otherwise. tim
should have been started previously ! void bench_blas | ( | index_t | min, |
index_t | max, | ||
int | step, | ||
int | charac | ||
) |
Benchmark fgemm Y=AX for several sizes of sqare matrices.
min | min size |
max | max size |
step | step of the size between 2 benchmarks |
charac | characteristic of the field. |
void bench_square | ( | index_t | min, |
index_t | max, | ||
int | step, | ||
int | charac | ||
) |
Benchmark square fgemm Y=AX for several fields.
min | min size |
max | max size |
step | step of the size between 2 benchmarks |
charac | characteristic of the field. |
void bench_rectangular | ( | index_t | k, |
int | charac, | ||
index_t | l = 2 |
||
) |
Benchmark fgemm Y=AX for several shapes.
Let n=k^2. we test the following shapes :
k | parameter. |
charac | characteristic of the field. |
l | small parameter (ie close to 1) |
void bench_scalar | ( | index_t | k, |
int | charac, | ||
bool | inplace | ||
) |
Benchmark fgemm for general
.
k | parameter. |
charac | characteristic of the field. |
inplace | "inplace" matmul (ie. C=D is overwritten) |
void bench_transpose | ( | index_t | k, |
int | charac, | ||
bool | inplace | ||
) |
Benchmark fgemm for
(transpose or not).
k | parameter. |
charac | characteristic of the field. |
inplace | "inplace" matmul (ie. C=D is overwritten) |
int main | ( | int | ac, |
char ** | av | ||
) |