Bugzilla – Attachment 473 Details for
Bug 839
Wrong 1x1 triangular matrix-vector product
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
Demo reproducing the bug
tri.cpp (text/x-csrc), 955 bytes, created by
Chen-Pang He
on 2014-07-07 14:28:02 UTC
(
hide
)
Description:
Demo reproducing the bug
Filename:
MIME Type:
Creator:
Chen-Pang He
Created:
2014-07-07 14:28:02 UTC
Size:
955 bytes
patch
obsolete
>#include <Eigen/Core> >#include <cstdlib> >#include <iostream> > >int main() >{ > using namespace Eigen; > using namespace std; > > enum { N = 8 }; > typedef double Scalar; > typedef Matrix<Scalar,N,1> Vector; > typedef Matrix<Scalar,1,1> Matrix; > typedef Vector::Index Index; > > srand(time(NULL)); > > Vector vec = Vector::Random(); > Matrix mat = Matrix::Random().triangularView<Upper>(); > Scalar arr[N] = {}; > > internal::triangular_matrix_vector_product< > Index, Lower, > Scalar, false, > Scalar, false, > RowMajor> > ::run(vec.cols(), vec.rows(), > mat.data(), mat.outerStride(), > vec.data(), vec.innerStride(), > arr, 1, Scalar(1)); > > cout << "Matrix:\n" << vec * mat << "\n\n" > "Triangular:\n" << vec * mat.triangularView<Upper>() << "\n\n" > "?TRMV:\n" << Map<Vector>(arr) << "\n\n" > "?TRMM:\n" << TriangularProduct<Upper,false,Vector,false,Matrix,false>(vec, mat) << endl; > > return 0; >}
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 839
: 473