Bugzilla – Attachment 837 Details for
Bug 1516
The module Eigen::matrix.diagonal(x) not giving right result after compilation when x>no_of_column
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
[patch]
Added eigen_assert() to constructor of class Diagonal.
bug1516 (text/plain), 1.28 KB, created by
Mayank Agarwal
on 2018-03-20 08:41:41 UTC
(
hide
)
Description:
Added eigen_assert() to constructor of class Diagonal.
Filename:
MIME Type:
Creator:
Mayank Agarwal
Created:
2018-03-20 08:41:41 UTC
Size:
1.28 KB
patch
obsolete
># HG changeset patch ># User Mayank Agarwal <mayank007.win@gmail.com> ># Date 1520885089 -19800 ># Tue Mar 13 01:34:49 2018 +0530 ># Node ID ca6f308b87eb9e87e59aff37c4b68eb30188072c ># Parent 306356e228ecbc70ddc0bcd5880bfa9acb9a16e7 >Added eigen_assert() to constructor of class Diagonal. > >diff --git a/Eigen/src/Core/Diagonal.h b/Eigen/src/Core/Diagonal.h >--- a/Eigen/src/Core/Diagonal.h >+++ b/Eigen/src/Core/Diagonal.h >@@ -65,17 +65,19 @@ template<typename MatrixType, int _DiagI > { > public: > > enum { DiagIndex = _DiagIndex }; > typedef typename internal::dense_xpr_base<Diagonal>::type Base; > EIGEN_DENSE_PUBLIC_INTERFACE(Diagonal) > > EIGEN_DEVICE_FUNC >- explicit inline Diagonal(MatrixType& matrix, Index a_index = DiagIndex) : m_matrix(matrix), m_index(a_index) {} >+ explicit inline Diagonal(MatrixType& matrix, Index a_index = DiagIndex) : m_matrix(matrix), m_index(a_index) { >+ eigen_assert(a_index <= this->cols() && (-a_index) <= this->rows()); >+ } > > EIGEN_INHERIT_ASSIGNMENT_OPERATORS(Diagonal) > > EIGEN_DEVICE_FUNC > inline Index rows() const > { > return m_index.value()<0 ? numext::mini<Index>(m_matrix.cols(),m_matrix.rows()+m_index.value()) > : numext::mini<Index>(m_matrix.rows(),m_matrix.cols()-m_index.value());
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 Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1516
:
833
| 837