#include <iostream>
#include <iomanip>
#include <boost/numeric/ublas/duff.hpp>
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/operation_blocked.hpp>
#include <boost/numeric/ublas/io.hpp>
#include <boost/timer.hpp>
Go to the source code of this file.
Namespaces | |
namespace | std |
Defines | |
#define | mul(a, b, m) |
#define | mul2(xtype) |
#define | mul3(xtype) |
#define | mulset(xtype, atype, btype) |
Typedefs | |
typedef ublas::matrix< double, ublas::column_major > | CT |
typedef ublas::matrix< double, ublas::row_major > | RT |
Functions | |
void | initmatrix (ublas::matrix< double > &A) |
void | initmatrix (ublas::matrix< double, ublas::column_major > &A) |
template<class M> void | zeromatrix (M &X) |
void | test2 (const size_t size) |
int | main (int argc, char *argv[]) |
|
Value: { \ initmatrix(A); \ initmatrix(B); \ t.restart(); \ for (size_t a=0;a<size;a++) \ for (size_t b=0;b<size;b++) \ size_t m = 0; \ DD (size, 4, e, ((X(r,c) += A(r,k)*B(k,c)), ++m) ); \ time = t.elapsed(); \ cout << setw(8) << time << flush; \ } Definition at line 34 of file mul_bench.cpp. |
|
Value: { \ zeromatrix(X); \ initmatrix(A); \ initmatrix(B); \ t.restart(); \ X.plus_assign(prod(A,B)); \ time = t.elapsed(); \ cout << setw(8) << time << flush; \ cerr << equals(X,prod(A,B)) << endl; \ } Definition at line 47 of file mul_bench.cpp. |
|
Value: { \ zeromatrix(X); \ initmatrix(A); \ initmatrix(B); \ t.restart(); \ X.plus_assign(ublas::block_prod<xtype>(A,B,64)); \ time = t.elapsed(); \ cout << setw(8) << time << flush; \ cerr << equals(X,prod(A,B)) << endl; \ } Definition at line 59 of file mul_bench.cpp. |
|
Value: { \ xtype X(size,size); \ atype A(size,size); \ btype B(size,size); \ mul2(xtype); \ mul3(xtype); \ mul(r,k,c); \ mul(r,c,k); \ mul(k,r,c); \ mul(k,c,r); \ mul(c,r,k); \ mul(c,k,r); \ cout << endl; \ } Definition at line 71 of file mul_bench.cpp. |
|
Definition at line 31 of file mul_bench.cpp. |
|
Definition at line 32 of file mul_bench.cpp. |
|
Definition at line 19 of file mul_bench.cpp. |
|
Definition at line 14 of file mul_bench.cpp. |
|
Definition at line 103 of file mul_bench.cpp. References test2(). |
|
Definition at line 87 of file mul_bench.cpp. References CT, mulset, and RT. Referenced by main(). |
|
Definition at line 26 of file mul_bench.cpp. |