Disabled external gits
This commit is contained in:
75
cs440-acg/ext/eigen/failtest/CMakeLists.txt
Normal file
75
cs440-acg/ext/eigen/failtest/CMakeLists.txt
Normal file
@@ -0,0 +1,75 @@
|
||||
message(STATUS "Running the failtests")
|
||||
|
||||
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("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")
|
||||
|
||||
if (EIGEN_FAILTEST_FAILURE_COUNT)
|
||||
message(FATAL_ERROR
|
||||
"${EIGEN_FAILTEST_FAILURE_COUNT} out of ${EIGEN_FAILTEST_COUNT} failtests FAILED. "
|
||||
"To debug these failures, manually compile these programs in ${CMAKE_CURRENT_SOURCE_DIR}, "
|
||||
"with and without #define EIGEN_SHOULD_FAIL_TO_BUILD.")
|
||||
else()
|
||||
message(STATUS "Failtest SUCCESS: all ${EIGEN_FAILTEST_COUNT} failtests passed.")
|
||||
message(STATUS "")
|
||||
endif()
|
14
cs440-acg/ext/eigen/failtest/bdcsvd_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/bdcsvd_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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,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 Matrix3d &m){
|
||||
Block<Matrix3d,3,3> b(m,0,0);
|
||||
}
|
||||
|
||||
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 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() {}
|
14
cs440-acg/ext/eigen/failtest/colpivqr_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/colpivqr_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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,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 Matrix3d &m){
|
||||
Block<Matrix3d,3,3> b(m.block<3,3>(0,0));
|
||||
}
|
||||
|
||||
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 Matrix3d &m){
|
||||
Block<Matrix3d> b(m.block(0,0,3,3));
|
||||
}
|
||||
|
||||
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 Matrix3d &m){
|
||||
Diagonal<Matrix3d> b(m.diagonal());
|
||||
}
|
||||
|
||||
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 Matrix3d &m){
|
||||
Transpose<Matrix3d> b(m.transpose());
|
||||
}
|
||||
|
||||
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 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<double>,CV_QUALIFIER MatrixXf>(m).coeffRef(0, 0) = 1.0f;
|
||||
}
|
||||
|
||||
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 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() {}
|
14
cs440-acg/ext/eigen/failtest/eigensolver_cplx.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/eigensolver_cplx.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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));
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/eigensolver_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/eigensolver_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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
cs440-acg/ext/eigen/failtest/failtest_sanity_check.cpp
Normal file
5
cs440-acg/ext/eigen/failtest/failtest_sanity_check.cpp
Normal 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
|
14
cs440-acg/ext/eigen/failtest/fullpivlu_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/fullpivlu_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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));
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/fullpivqr_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/fullpivqr_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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));
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/jacobisvd_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/jacobisvd_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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));
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/ldlt_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/ldlt_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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));
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/llt_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/llt_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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,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){
|
||||
Map<Matrix3f> m(ptr);
|
||||
}
|
||||
|
||||
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 size){
|
||||
Map<ArrayXf> m(ptr, size);
|
||||
}
|
||||
|
||||
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> 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,15 @@
|
||||
#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,15 @@
|
||||
#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() {}
|
14
cs440-acg/ext/eigen/failtest/partialpivlu_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/partialpivlu_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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));
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/qr_int.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/qr_int.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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));
|
||||
}
|
18
cs440-acg/ext/eigen/failtest/ref_1.cpp
Normal file
18
cs440-acg/ext/eigen/failtest/ref_1.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#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);
|
||||
}
|
15
cs440-acg/ext/eigen/failtest/ref_2.cpp
Normal file
15
cs440-acg/ext/eigen/failtest/ref_2.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#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
|
||||
}
|
15
cs440-acg/ext/eigen/failtest/ref_3.cpp
Normal file
15
cs440-acg/ext/eigen/failtest/ref_3.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#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);
|
||||
}
|
15
cs440-acg/ext/eigen/failtest/ref_4.cpp
Normal file
15
cs440-acg/ext/eigen/failtest/ref_4.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#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
|
||||
}
|
16
cs440-acg/ext/eigen/failtest/ref_5.cpp
Normal file
16
cs440-acg/ext/eigen/failtest/ref_5.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
}
|
@@ -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 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() {}
|
18
cs440-acg/ext/eigen/failtest/sparse_ref_1.cpp
Normal file
18
cs440-acg/ext/eigen/failtest/sparse_ref_1.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#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);
|
||||
}
|
15
cs440-acg/ext/eigen/failtest/sparse_ref_2.cpp
Normal file
15
cs440-acg/ext/eigen/failtest/sparse_ref_2.cpp
Normal 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);
|
||||
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
|
||||
call_ref(A.row(3));
|
||||
#else
|
||||
call_ref(A.col(3));
|
||||
#endif
|
||||
}
|
15
cs440-acg/ext/eigen/failtest/sparse_ref_3.cpp
Normal file
15
cs440-acg/ext/eigen/failtest/sparse_ref_3.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#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);
|
||||
}
|
15
cs440-acg/ext/eigen/failtest/sparse_ref_4.cpp
Normal file
15
cs440-acg/ext/eigen/failtest/sparse_ref_4.cpp
Normal 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);
|
||||
#ifdef EIGEN_SHOULD_FAIL_TO_BUILD
|
||||
call_ref(A.transpose());
|
||||
#else
|
||||
call_ref(A);
|
||||
#endif
|
||||
}
|
16
cs440-acg/ext/eigen/failtest/sparse_ref_5.cpp
Normal file
16
cs440-acg/ext/eigen/failtest/sparse_ref_5.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#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
|
||||
}
|
16
cs440-acg/ext/eigen/failtest/sparse_storage_mismatch.cpp
Normal file
16
cs440-acg/ext/eigen/failtest/sparse_storage_mismatch.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#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;
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/swap_1.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/swap_1.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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);
|
||||
}
|
14
cs440-acg/ext/eigen/failtest/swap_2.cpp
Normal file
14
cs440-acg/ext/eigen/failtest/swap_2.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#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
|
||||
}
|
13
cs440-acg/ext/eigen/failtest/ternary_1.cpp
Normal file
13
cs440-acg/ext/eigen/failtest/ternary_1.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#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
|
||||
}
|
13
cs440-acg/ext/eigen/failtest/ternary_2.cpp
Normal file
13
cs440-acg/ext/eigen/failtest/ternary_2.cpp
Normal file
@@ -0,0 +1,13 @@
|
||||
#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,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 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,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 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() {}
|
Reference in New Issue
Block a user