Bugzilla – Attachment 117 Details for
Bug 213
fixed-size matrix product crashes when EIGEN_DONT_ALIGN_STATICALLY is defined
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
Sample code to reproduce the bug.
main.cpp (text/plain), 1.00 KB, created by
Hauke Heibel
on 2011-03-03 15:59:06 UTC
(
hide
)
Description:
Sample code to reproduce the bug.
Filename:
MIME Type:
Creator:
Hauke Heibel
Created:
2011-03-03 15:59:06 UTC
Size:
1.00 KB
patch
obsolete
>#define EIGEN_DONT_ALIGN_STATICALLY > >#include <iostream> > >#include <Eigen/Eigen> >#include <Eigen/Geometry> >#include <bench/BenchTimer.h> > >using namespace Eigen; > >template<int m, int n> >EIGEN_DONT_INLINE Eigen::Matrix<double, n, 1> run(const Eigen::Matrix<double, m, n>& A, const Eigen::Matrix<double, m, 1>& b) >{ > //const Eigen::Matrix<double, n, m> Atrans = A.transpose(); > //const Eigen::Matrix<double, n, n> pseudo = Atrans * A; > return ((A.transpose()*A).inverse() * A.transpose()) * b; >} > >enum >{ > m = 100, > n = 4 >}; > >int main(int argc, char* argv[]) >{ > Eigen::Matrix<double, n, 1> par = Eigen::Matrix<double, n, 1>::Zero(); > > Eigen::BenchTimer timer; > timer.start(); > for (int i=0; i<100000; ++i) > { > Eigen::Matrix<double, m, n> A = Eigen::Matrix<double, m, n>::Random(); > Eigen::Matrix<double, m, 1> b = Eigen::Matrix<double, m, 1>::Random(); > par += run<m,n>(A,b); > } > timer.stop(); > > std::cout << "time: " << timer.value()*1000.0 << "ms" << std::endl; >}
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 213
:
117
|
120
|
121
|
122