Bugzilla – Attachment 273 Details for
Bug 469
very bad performance with small dynamic pre-allocated matrices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Forgot Password
Login:
[x]
This bugzilla service is closed. All entries have been migrated to
https://gitlab.com/libeigen/eigen
te
bug_slowdynprod.cpp (text/plain), 772 bytes, created by
Gael Guennebaud
on 2012-06-02 16:21:20 UTC
(
hide
)
Description:
te
Filename:
MIME Type:
Creator:
Gael Guennebaud
Created:
2012-06-02 16:21:20 UTC
Size:
772 bytes
patch
obsolete
>#include <iostream> >#include <Eigen/Dense> > >#include <bench/BenchTimer.h> > >using namespace Eigen; > >template<typename Mat> >EIGEN_DONT_INLINE void foo1(const Mat& m1, const Mat& m2, Mat& m3, Mat& m4, Mat& mr) >{ > m3.noalias() = m1 * m2; > m4.noalias() = m1 * m2; > mr += m3 + m4; >// mr = m1 * m2 + m1 * m2; >} > >template<int S> void foo2(int size = S) >{ > Matrix<double,S,S> m1(size,size), m2(size,size), m3(size,size), m4(size,size), mr(size,size); > for (int i = 0; i < size; i++) { > for (int j = 0; j < size; j++) { > m1(i,j) = (i+1)*(j+1); > m2(j,i) = (i+1)*(j+1); > } > mr(i,i) = 0; > } > BenchTimer t; > BENCH(t, 10, 1000000, foo1(m1,m2,m3,m4,mr)); > std::cout << t.best() << "\n"; >} > >int main() >{ > foo2<6>(); > foo2<Dynamic>(6); >} >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 469
:
271
| 273 |
274
|
275
|
276
|
277