diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-26 21:52:10 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-02-26 21:52:10 +0400 |
commit | 1d20f2496ab489c98224375ba63f4a726e931edb (patch) | |
tree | ccf4d56f44a639c724b295f77ad6510715f6026f /extern/libmv/third_party/ceres/bundle.sh | |
parent | 0f91a283d401df68e45ff8c9e18d3c9f2fe79d84 (diff) |
Use threaded cost function and jacobian computation
Also made it theraded linear solver, seems it makes
sense for iterative schur with inner iterations
enabled.
Use OpenMO's max therads called from bundler code
to detect how many threads to use. Could be changed
in a way that number of threads is passing in options
from blender side in the future.
Also removed redundant V3D definition from compiler's
flags.
Diffstat (limited to 'extern/libmv/third_party/ceres/bundle.sh')
-rwxr-xr-x | extern/libmv/third_party/ceres/bundle.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/extern/libmv/third_party/ceres/bundle.sh b/extern/libmv/third_party/ceres/bundle.sh index b2c8330ec3e..65af263f7c4 100755 --- a/extern/libmv/third_party/ceres/bundle.sh +++ b/extern/libmv/third_party/ceres/bundle.sh @@ -162,8 +162,15 @@ add_definitions( -DCERES_NO_CXSPARSE -DCERES_NO_PROTOCOL_BUFFERS -DCERES_RESTRICT_SCHUR_SPECIALIZATION + -DCERES_HAVE_RWLOCK ) +if(WITH_OPENMP) + add_definitions( + -DCERES_USE_OPENMP + ) +endif() + if(MSVC10) add_definitions( -D"CERES_HASH_NAMESPACE_START=namespace std {" @@ -213,6 +220,10 @@ defs.append('CERES_NO_SUITESPARSE') defs.append('CERES_NO_CXSPARSE') defs.append('CERES_NO_PROTOCOL_BUFFERS') defs.append('CERES_RESTRICT_SCHUR_SPECIALIZATION') +defs.append('CERES_HAVE_RWLOCK') + +if env['WITH_BF_OPENMP']: + defs.append('CERES_USE_OPENMP') if 'Mac OS X 10.5' in env['MACOSX_SDK_CHECK']: defs.append('CERES_NO_TR1') |