Fix a bug in DetectStructure

The logic for determing static/dynamic f-block size in
DetectStructure was broken in a corner case, where the very first
row block which was used to initialize the f_block_size contained
more than one f blocks of varying sizes. The way the if block
was structured, no iteration was performed on the remaining
f-blocks and the loop failed to detect that the f-block size
was actually changing.

If in the remaining row blocks, there were no row blocks
with varying f-block sizes, the function will erroneously
return a static f-block size.

Thanks to Johannes Schonberger for providing a reproduction for this
rather tricky corner case.

Change-Id: Ib442a041d8b7efd29f9653be6a11a69d0eccd1ec
3 files changed
tree: 57456f0db58b1c426ded7412cafb9fbb90147fe8
  1. cmake/
  2. config/
  3. data/
  4. docs/
  5. examples/
  6. include/
  7. internal/
  8. jni/
  9. scripts/
  10. .gitignore
  11. CMakeLists.txt
  12. LICENSE
  13. README.md
README.md

Ceres Solver - A non-linear least squares minimizer

Please see ceres-solver.org for more information.

WARNING - Do not make GitHub pull requests!

Ceres development happens on Gerrit, including both repository hosting and code reviews. The GitHub Repository is a continuously updated mirror which is primarily meant for issue tracking. Please see our Contributing to Ceres Guide for more details.

The upstream Gerrit repository is

https://ceres-solver.googlesource.com/ceres-solver