mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Add static assertion on selfadjoint-view's UpLo parameter.
(grafted from d820ab9edc
)
This commit is contained in:
@@ -71,7 +71,9 @@ template<typename _MatrixType, unsigned int UpLo> class SelfAdjointView
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
explicit inline SelfAdjointView(MatrixType& matrix) : m_matrix(matrix)
|
||||
{}
|
||||
{
|
||||
EIGEN_STATIC_ASSERT(UpLo==Lower || UpLo==Upper,SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY);
|
||||
}
|
||||
|
||||
EIGEN_DEVICE_FUNC
|
||||
inline Index rows() const { return m_matrix.rows(); }
|
||||
|
||||
@@ -101,7 +101,8 @@
|
||||
THIS_TYPE_IS_NOT_SUPPORTED=1,
|
||||
STORAGE_KIND_MUST_MATCH=1,
|
||||
STORAGE_INDEX_MUST_MATCH=1,
|
||||
CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY=1
|
||||
CHOLMOD_SUPPORTS_DOUBLE_PRECISION_ONLY=1,
|
||||
SELFADJOINTVIEW_ACCEPTS_UPPER_AND_LOWER_MODE_ONLY=1
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user