initial commit

This commit is contained in:
huangweifeng
2026-10-22 09:23:54 +08:00
commit 63f557a39f
4448 changed files with 584487 additions and 0 deletions
+68
View File
@@ -0,0 +1,68 @@
ei_add_failtest("failtest_sanity_check")
ei_add_failtest("block_nonconst_ctor_on_const_xpr_0")
ei_add_failtest("block_nonconst_ctor_on_const_xpr_1")
ei_add_failtest("block_nonconst_ctor_on_const_xpr_2")
ei_add_failtest("transpose_nonconst_ctor_on_const_xpr")
ei_add_failtest("diagonal_nonconst_ctor_on_const_xpr")
ei_add_failtest("cwiseunaryview_nonconst_ctor_on_const_xpr")
ei_add_failtest("triangularview_nonconst_ctor_on_const_xpr")
ei_add_failtest("selfadjointview_nonconst_ctor_on_const_xpr")
ei_add_failtest("const_qualified_block_method_retval_0")
ei_add_failtest("const_qualified_block_method_retval_1")
ei_add_failtest("const_qualified_transpose_method_retval")
ei_add_failtest("const_qualified_diagonal_method_retval")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_0")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_1")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_2")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_3")
ei_add_failtest("map_nonconst_ctor_on_const_ptr_4")
ei_add_failtest("map_on_const_type_actually_const_0")
ei_add_failtest("map_on_const_type_actually_const_1")
ei_add_failtest("block_on_const_type_actually_const_0")
ei_add_failtest("block_on_const_type_actually_const_1")
ei_add_failtest("transpose_on_const_type_actually_const")
ei_add_failtest("diagonal_on_const_type_actually_const")
ei_add_failtest("cwiseunaryview_on_const_type_actually_const")
ei_add_failtest("triangularview_on_const_type_actually_const")
ei_add_failtest("selfadjointview_on_const_type_actually_const")
ei_add_failtest("ref_1")
ei_add_failtest("ref_2")
ei_add_failtest("ref_3")
ei_add_failtest("ref_4")
ei_add_failtest("ref_5")
ei_add_failtest("ref_6")
ei_add_failtest("ref_7")
ei_add_failtest("swap_1")
ei_add_failtest("swap_2")
ei_add_failtest("ternary_1")
ei_add_failtest("ternary_2")
ei_add_failtest("sparse_ref_1")
ei_add_failtest("sparse_ref_2")
ei_add_failtest("sparse_ref_3")
ei_add_failtest("sparse_ref_4")
ei_add_failtest("sparse_ref_5")
ei_add_failtest("sparse_storage_mismatch")
ei_add_failtest("partialpivlu_int")
ei_add_failtest("fullpivlu_int")
ei_add_failtest("llt_int")
ei_add_failtest("ldlt_int")
ei_add_failtest("qr_int")
ei_add_failtest("colpivqr_int")
ei_add_failtest("fullpivqr_int")
ei_add_failtest("jacobisvd_int")
ei_add_failtest("bdcsvd_int")
ei_add_failtest("eigensolver_int")
ei_add_failtest("eigensolver_cplx")
ei_add_failtest("initializer_list_1")
ei_add_failtest("initializer_list_2")
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/SVD"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { BDCSVD<Matrix<SCALAR, Dynamic, Dynamic> > qr(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) { Block<Matrix3d, 3, 3> b(m, 0, 0); }
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) { Block<Matrix3d> b(m, 0, 0, 3, 3); }
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) {
// row/column constructor
Block<Matrix3d, 3, 1> b(m, 0);
}
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo() {
Matrix3f m;
Block<CV_QUALIFIER Matrix3f>(m, 0, 0, 3, 3).coeffRef(0, 0) = 1.0f;
}
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo() {
MatrixXf m;
Block<CV_QUALIFIER MatrixXf, 3, 3>(m, 0, 0).coeffRef(0, 0) = 1.0f;
}
int main() {}
+13
View File
@@ -0,0 +1,13 @@
#include "../Eigen/QR"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() {
ColPivHouseholderQR<Matrix<SCALAR, Dynamic, Dynamic> > qr(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10));
}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) {
Block<Matrix3d, 3, 3> b(m.block<3, 3>(0, 0));
EIGEN_UNUSED_VARIABLE(b);
}
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) {
Block<Matrix3d> b(m.block(0, 0, 3, 3));
EIGEN_UNUSED_VARIABLE(b);
}
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) {
Diagonal<Matrix3d> b(m.diagonal());
EIGEN_UNUSED_VARIABLE(b);
}
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) {
Transpose<Matrix3d> b(m.transpose());
EIGEN_UNUSED_VARIABLE(b);
}
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) { CwiseUnaryView<internal::scalar_real_ref_op<double>, Matrix3d> t(m); }
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo() {
MatrixXf m;
CwiseUnaryView<internal::scalar_real_ref_op<float>, CV_QUALIFIER MatrixXf>(m).coeffRef(0, 0) = 1.0f;
}
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) { Diagonal<Matrix3d> d(m); }
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo() {
MatrixXf m;
Diagonal<CV_QUALIFIER MatrixXf>(m).coeffRef(0) = 1.0f;
}
int main() {}
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/Eigenvalues"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR std::complex<double>
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { EigenSolver<Matrix<SCALAR, Dynamic, Dynamic> > eig(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/Eigenvalues"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { EigenSolver<Matrix<SCALAR, Dynamic, Dynamic> > eig(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
+5
View File
@@ -0,0 +1,5 @@
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
This is just some text that won't compile as a C++ file, as a basic sanity check for failtest.
#else
int main() {}
#endif
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/LU"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { FullPivLU<Matrix<SCALAR, Dynamic, Dynamic> > lu(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
+13
View File
@@ -0,0 +1,13 @@
#include "../Eigen/QR"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() {
FullPivHouseholderQR<Matrix<SCALAR, Dynamic, Dynamic> > qr(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10));
}
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define ROWS Dynamic
#else
#define ROWS 3
#endif
using namespace Eigen;
int main() { Matrix<int, ROWS, 1>{1, 2, 3}; }
+13
View File
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define ROWS Dynamic
#define COLS Dynamic
#else
#define ROWS 3
#define COLS 1
#endif
using namespace Eigen;
int main() { Matrix<int, ROWS, COLS>{1, 2, 3}; }
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/SVD"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { JacobiSVD<Matrix<SCALAR, Dynamic, Dynamic> > qr(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/Cholesky"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { LDLT<Matrix<SCALAR, Dynamic, Dynamic> > ldlt(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/Cholesky"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { LLT<Matrix<SCALAR, Dynamic, Dynamic> > llt(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER float *ptr) { Map<Matrix3f> m(ptr); }
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER float *ptr, DenseIndex size) { Map<ArrayXf> m(ptr, size); }
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER float *ptr, DenseIndex rows, DenseIndex cols) { Map<MatrixXf> m(ptr, rows, cols); }
int main() {}
@@ -0,0 +1,15 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER float *ptr, DenseIndex rows, DenseIndex cols) {
Map<MatrixXf, Aligned, InnerStride<2> > m(ptr, rows, cols, InnerStride<2>());
}
int main() {}
@@ -0,0 +1,15 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER
#else
#define CV_QUALIFIER const
#endif
using namespace Eigen;
void foo(const float *ptr, DenseIndex rows, DenseIndex cols) {
Map<CV_QUALIFIER MatrixXf, Unaligned, OuterStride<> > m(ptr, rows, cols, OuterStride<>(2));
}
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(float *ptr) { Map<CV_QUALIFIER MatrixXf>(ptr, 1, 1).coeffRef(0, 0) = 1.0f; }
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(float *ptr) { Map<CV_QUALIFIER Vector3f>(ptr).coeffRef(0) = 1.0f; }
int main() {}
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/LU"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { PartialPivLU<Matrix<SCALAR, Dynamic, Dynamic> > lu(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
+11
View File
@@ -0,0 +1,11 @@
#include "../Eigen/QR"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define SCALAR int
#else
#define SCALAR float
#endif
using namespace Eigen;
int main() { HouseholderQR<Matrix<SCALAR, Dynamic, Dynamic> > qr(Matrix<SCALAR, Dynamic, Dynamic>::Random(10, 10)); }
+17
View File
@@ -0,0 +1,17 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void call_ref(Ref<VectorXf> a) {}
int main() {
VectorXf a(10);
CV_QUALIFIER VectorXf& ac(a);
call_ref(ac);
}
+14
View File
@@ -0,0 +1,14 @@
#include "../Eigen/Core"
using namespace Eigen;
void call_ref(Ref<VectorXf> a) {}
int main() {
MatrixXf A(10, 10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(A.row(3));
#else
call_ref(A.col(3));
#endif
}
+14
View File
@@ -0,0 +1,14 @@
#include "../Eigen/Core"
using namespace Eigen;
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
void call_ref(Ref<VectorXf> a) {}
#else
void call_ref(const Ref<const VectorXf> &a) {}
#endif
int main() {
VectorXf a(10);
call_ref(a + a);
}
+14
View File
@@ -0,0 +1,14 @@
#include "../Eigen/Core"
using namespace Eigen;
void call_ref(Ref<MatrixXf, 0, OuterStride<> > a) {}
int main() {
MatrixXf A(10, 10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(A.transpose());
#else
call_ref(A);
#endif
}
+15
View File
@@ -0,0 +1,15 @@
#include "../Eigen/Core"
using namespace Eigen;
void call_ref(Ref<VectorXf> a) {}
int main() {
VectorXf a(10);
DenseBase<VectorXf> &ac(a);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(ac);
#else
call_ref(ac.derived());
#endif
}
+15
View File
@@ -0,0 +1,15 @@
#include "../Eigen/Core"
using namespace Eigen;
void call_ref(Ref<const VectorXf, 0, InnerStride<2>>) {}
int main() {
VectorXf a(10);
Map<const VectorXf, 0, InnerStride<2>> m(a.data(), 5);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(a);
#else
call_ref(m);
#endif
}
+16
View File
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
using namespace Eigen;
void call_ref(Ref<const Matrix3f, 0, OuterStride<2>>) {}
int main() {
MatrixXf a(6, 2);
Map<const Matrix3f, 0, OuterStride<Dynamic>> md(a.data(), OuterStride<Dynamic>(2));
Map<const Matrix3f, 0, OuterStride<2>> m2(a.data());
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(md);
#else
call_ref(m2);
#endif
}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) { SelfAdjointView<Matrix3d, Upper> t(m); }
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo() {
MatrixXf m;
SelfAdjointView<CV_QUALIFIER MatrixXf, Upper>(m).coeffRef(0, 0) = 1.0f;
}
int main() {}
+17
View File
@@ -0,0 +1,17 @@
#include "../Eigen/Sparse"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void call_ref(Ref<SparseMatrix<float> > a) {}
int main() {
SparseMatrix<float> a(10, 10);
CV_QUALIFIER SparseMatrix<float>& ac(a);
call_ref(ac);
}
+14
View File
@@ -0,0 +1,14 @@
#include "../Eigen/Sparse"
using namespace Eigen;
void call_ref(Ref<SparseMatrix<float> > a) {}
int main() {
SparseMatrix<float> A(10, 10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(A.row(3));
#else
call_ref(A.col(3));
#endif
}
+14
View File
@@ -0,0 +1,14 @@
#include "../Eigen/Sparse"
using namespace Eigen;
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
void call_ref(Ref<SparseMatrix<float> > a) {}
#else
void call_ref(const Ref<const SparseMatrix<float> > &a) {}
#endif
int main() {
SparseMatrix<float> a(10, 10);
call_ref(a + a);
}
+14
View File
@@ -0,0 +1,14 @@
#include "../Eigen/Sparse"
using namespace Eigen;
void call_ref(Ref<SparseMatrix<float> > a) {}
int main() {
SparseMatrix<float> A(10, 10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(A.transpose());
#else
call_ref(A);
#endif
}
+15
View File
@@ -0,0 +1,15 @@
#include "../Eigen/Sparse"
using namespace Eigen;
void call_ref(Ref<SparseMatrix<float> > a) {}
int main() {
SparseMatrix<float> a(10, 10);
SparseMatrixBase<SparseMatrix<float> > &ac(a);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
call_ref(ac);
#else
call_ref(ac.derived());
#endif
}
+15
View File
@@ -0,0 +1,15 @@
#include "../Eigen/Sparse"
using namespace Eigen;
typedef SparseMatrix<double, ColMajor> Mat1;
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
typedef SparseMatrix<double, RowMajor> Mat2;
#else
typedef SparseMatrix<double, ColMajor> Mat2;
#endif
int main() {
Mat1 a(10, 10);
Mat2 b(10, 10);
a += b;
}
+13
View File
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
using namespace Eigen;
int main() {
VectorXf a(10), b(10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
const DenseBase<VectorXf> &ac(a);
#else
DenseBase<VectorXf> &ac(a);
#endif
b.swap(ac);
}
+13
View File
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
using namespace Eigen;
int main() {
VectorXf a(10), b(10);
VectorXf const &ac(a);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
b.swap(ac);
#else
b.swap(ac.const_cast_derived());
#endif
}
+12
View File
@@ -0,0 +1,12 @@
#include "../Eigen/Core"
using namespace Eigen;
int main(int argc, char **) {
VectorXf a(10), b(10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
b = argc > 1 ? 2 * a : -a;
#else
b = argc > 1 ? 2 * a : VectorXf(-a);
#endif
}
+12
View File
@@ -0,0 +1,12 @@
#include "../Eigen/Core"
using namespace Eigen;
int main(int argc, char **) {
VectorXf a(10), b(10);
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
b = argc > 1 ? 2 * a : a + a;
#else
b = argc > 1 ? VectorXf(2 * a) : VectorXf(a + a);
#endif
}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) { Transpose<Matrix3d> t(m); }
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo() {
MatrixXf m;
Transpose<CV_QUALIFIER MatrixXf>(m).coeffRef(0, 0) = 1.0f;
}
int main() {}
@@ -0,0 +1,13 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo(CV_QUALIFIER Matrix3d &m) { TriangularView<Matrix3d, Upper> t(m); }
int main() {}
@@ -0,0 +1,16 @@
#include "../Eigen/Core"
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
#define CV_QUALIFIER const
#else
#define CV_QUALIFIER
#endif
using namespace Eigen;
void foo() {
MatrixXf m;
TriangularView<CV_QUALIFIER MatrixXf, Upper>(m).coeffRef(0, 0) = 1.0f;
}
int main() {}