Tracking: Enable Schur specializations
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 24 Sep 2014 10:57:31 +0000 (16:57 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 25 Sep 2014 07:04:16 +0000 (13:04 +0600)
This would give some performance boost when solving huge scenes,
amount of boost depends on particular scene.

For now enable all of the specializations, in the future we might
add some local patches and restrict only unneeded ones.

extern/libmv/third_party/ceres/CMakeLists.txt
extern/libmv/third_party/ceres/SConscript
extern/libmv/third_party/ceres/bundle.sh

index 770803868cc027d574dfee47b93bc21d89a6fbe9..8e80352370e46b0bdb129ca926976c784dae93d5 100644 (file)
@@ -245,46 +245,46 @@ set(SRC
        internal/ceres/wall_time.h
 )
 
-#if(FALSE)
-#      list(APPEND SRC
-#              internal/ceres/generated/partitioned_matrix_view_2_2_2.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_2_3.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_2_4.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_2_d.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_3_3.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_3_4.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_3_9.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_3_d.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_4_3.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_4_4.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_4_8.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_4_9.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_4_d.cc
-#              internal/ceres/generated/partitioned_matrix_view_2_d_d.cc
-#              internal/ceres/generated/partitioned_matrix_view_4_4_2.cc
-#              internal/ceres/generated/partitioned_matrix_view_4_4_3.cc
-#              internal/ceres/generated/partitioned_matrix_view_4_4_4.cc
-#              internal/ceres/generated/partitioned_matrix_view_4_4_d.cc
-#              internal/ceres/generated/schur_eliminator_2_2_2.cc
-#              internal/ceres/generated/schur_eliminator_2_2_3.cc
-#              internal/ceres/generated/schur_eliminator_2_2_4.cc
-#              internal/ceres/generated/schur_eliminator_2_2_d.cc
-#              internal/ceres/generated/schur_eliminator_2_3_3.cc
-#              internal/ceres/generated/schur_eliminator_2_3_4.cc
-#              internal/ceres/generated/schur_eliminator_2_3_9.cc
-#              internal/ceres/generated/schur_eliminator_2_3_d.cc
-#              internal/ceres/generated/schur_eliminator_2_4_3.cc
-#              internal/ceres/generated/schur_eliminator_2_4_4.cc
-#              internal/ceres/generated/schur_eliminator_2_4_8.cc
-#              internal/ceres/generated/schur_eliminator_2_4_9.cc
-#              internal/ceres/generated/schur_eliminator_2_4_d.cc
-#              internal/ceres/generated/schur_eliminator_2_d_d.cc
-#              internal/ceres/generated/schur_eliminator_4_4_2.cc
-#              internal/ceres/generated/schur_eliminator_4_4_3.cc
-#              internal/ceres/generated/schur_eliminator_4_4_4.cc
-#              internal/ceres/generated/schur_eliminator_4_4_d.cc
-#      )
-#endif()
+if(TRUE)
+       list(APPEND SRC
+               internal/ceres/generated/partitioned_matrix_view_2_2_2.cc
+               internal/ceres/generated/partitioned_matrix_view_2_2_3.cc
+               internal/ceres/generated/partitioned_matrix_view_2_2_4.cc
+               internal/ceres/generated/partitioned_matrix_view_2_2_d.cc
+               internal/ceres/generated/partitioned_matrix_view_2_3_3.cc
+               internal/ceres/generated/partitioned_matrix_view_2_3_4.cc
+               internal/ceres/generated/partitioned_matrix_view_2_3_9.cc
+               internal/ceres/generated/partitioned_matrix_view_2_3_d.cc
+               internal/ceres/generated/partitioned_matrix_view_2_4_3.cc
+               internal/ceres/generated/partitioned_matrix_view_2_4_4.cc
+               internal/ceres/generated/partitioned_matrix_view_2_4_8.cc
+               internal/ceres/generated/partitioned_matrix_view_2_4_9.cc
+               internal/ceres/generated/partitioned_matrix_view_2_4_d.cc
+               internal/ceres/generated/partitioned_matrix_view_2_d_d.cc
+               internal/ceres/generated/partitioned_matrix_view_4_4_2.cc
+               internal/ceres/generated/partitioned_matrix_view_4_4_3.cc
+               internal/ceres/generated/partitioned_matrix_view_4_4_4.cc
+               internal/ceres/generated/partitioned_matrix_view_4_4_d.cc
+               internal/ceres/generated/schur_eliminator_2_2_2.cc
+               internal/ceres/generated/schur_eliminator_2_2_3.cc
+               internal/ceres/generated/schur_eliminator_2_2_4.cc
+               internal/ceres/generated/schur_eliminator_2_2_d.cc
+               internal/ceres/generated/schur_eliminator_2_3_3.cc
+               internal/ceres/generated/schur_eliminator_2_3_4.cc
+               internal/ceres/generated/schur_eliminator_2_3_9.cc
+               internal/ceres/generated/schur_eliminator_2_3_d.cc
+               internal/ceres/generated/schur_eliminator_2_4_3.cc
+               internal/ceres/generated/schur_eliminator_2_4_4.cc
+               internal/ceres/generated/schur_eliminator_2_4_8.cc
+               internal/ceres/generated/schur_eliminator_2_4_9.cc
+               internal/ceres/generated/schur_eliminator_2_4_d.cc
+               internal/ceres/generated/schur_eliminator_2_d_d.cc
+               internal/ceres/generated/schur_eliminator_4_4_2.cc
+               internal/ceres/generated/schur_eliminator_4_4_3.cc
+               internal/ceres/generated/schur_eliminator_4_4_4.cc
+               internal/ceres/generated/schur_eliminator_4_4_d.cc
+       )
+endif()
 
 if(WIN32)
        list(APPEND INC
@@ -307,7 +307,6 @@ add_definitions(
        -DCERES_NO_SUITESPARSE
        -DCERES_NO_CXSPARSE
        -DCERES_NO_LAPACK
-       -DCERES_RESTRICT_SCHUR_SPECIALIZATION
        -DCERES_HAVE_RWLOCK
 )
 
index 573157cb77077768105db1fbab844429645e05ef..a8a50dbbf7d02578c02f8d8e9d9d4c4a21283cf0 100644 (file)
@@ -15,13 +15,12 @@ defs = []
 src += env.Glob('internal/ceres/*.cc')
 src += env.Glob('internal/ceres/generated/schur_eliminator_d_d_d.cc')
 src += env.Glob('internal/ceres/generated/partitioned_matrix_view_d_d_d.cc')
-#src += env.Glob('internal/ceres/generated/*.cc')
+src += env.Glob('internal/ceres/generated/*.cc')
 
 defs.append('CERES_HAVE_PTHREAD')
 defs.append('CERES_NO_SUITESPARSE')
 defs.append('CERES_NO_CXSPARSE')
 defs.append('CERES_NO_LAPACK')
-defs.append('CERES_RESTRICT_SCHUR_SPECIALIZATION')
 defs.append('CERES_HAVE_RWLOCK')
 
 if env['WITH_BF_OPENMP']:
index e7239d9a823553598fddb5a41437def0b82c2640..ec17ae24e307495bcbe9f0d13964078fee87a192 100755 (executable)
@@ -138,7 +138,7 @@ ${sources}
 ${headers}
 )
 
-#if(FALSE)
+#if(TRUE)
 #      list(APPEND SRC
 ${generated_sources}
 #      )
@@ -165,7 +165,6 @@ add_definitions(
        -DCERES_NO_SUITESPARSE
        -DCERES_NO_CXSPARSE
        -DCERES_NO_LAPACK
-       -DCERES_RESTRICT_SCHUR_SPECIALIZATION
        -DCERES_HAVE_RWLOCK
 )
 
@@ -217,13 +216,12 @@ defs = []
 $src
 src += env.Glob('internal/ceres/generated/schur_eliminator_d_d_d.cc')
 src += env.Glob('internal/ceres/generated/partitioned_matrix_view_d_d_d.cc')
-#src += env.Glob('internal/ceres/generated/*.cc')
+src += env.Glob('internal/ceres/generated/*.cc')
 
 defs.append('CERES_HAVE_PTHREAD')
 defs.append('CERES_NO_SUITESPARSE')
 defs.append('CERES_NO_CXSPARSE')
 defs.append('CERES_NO_LAPACK')
-defs.append('CERES_RESTRICT_SCHUR_SPECIALIZATION')
 defs.append('CERES_HAVE_RWLOCK')
 
 if env['WITH_BF_OPENMP']: