1. 08 Mar, 2017 2 commits
  2. 16 Nov, 2016 2 commits
    • Julien Michel's avatar
      PERF: Optimize BCOInterpolateImageFunction (kindly provided by Laurentiu Nicola) · b3a50337
      Julien Michel authored
      Simplify the code and avoid some allocations to improve performance.
      
      I haven't checked the definition of RealType, but merging the output and
      value variables might arguably affect precision. The unit tests still
      seem to pass, however.
      
      Tested by 2x upsampling a 10-band 5490x5490 float32 image on an Intel
      Celeron J1900.
      
      There is further room for improvement by eliding the remaining memory
      allocations. A container like the small_vector from Boost might be
      useful here, but we can't use that since it's not available in older
      Boost versions.
      
      before:
      661.44s user 9.31s system 304% cpu 3:40.52 total
      594.06s user 9.43s system 303% cpu 3:19.00 total
      591.15s user 9.43s system 301% cpu 3:19.28 total
      
      after:
      443.42s user 10.48s system 294% cpu 2:34.00 total
      443.11s user 9.87s system 309% cpu 2:26.27 total
      448.50s user 10.50s system 311% cpu 2:27.52 total
      b3a50337
    • Julien Michel's avatar
      PERF: Optimize BCOInterpolateImageFunction · 6a8c2a84
      Julien Michel authored
      Simplify the code and avoid some allocations to improve performance.
      
      I haven't checked the definition of RealType, but merging the output and
      value variables might arguably affect precision. The unit tests still
      seem to pass, however.
      
      Tested by 2x upsampling a 10-band 5490x5490 float32 image on an Intel
      Celeron J1900.
      
      There is further room for improvement by eliding the remaining memory
      allocations. A container like the small_vector from Boost might be
      useful here, but we can't use that since it's not available in older
      Boost versions.
      
      before:
      661.44s user 9.31s system 304% cpu 3:40.52 total
      594.06s user 9.43s system 303% cpu 3:19.00 total
      591.15s user 9.43s system 301% cpu 3:19.28 total
      
      after:
      443.42s user 10.48s system 294% cpu 2:34.00 total
      443.11s user 9.87s system 309% cpu 2:26.27 total
      448.50s user 10.50s system 311% cpu 2:27.52 total
      6a8c2a84
  3. 16 Sep, 2016 1 commit
  4. 15 Sep, 2016 1 commit
  5. 20 Jul, 2016 1 commit
  6. 16 Jun, 2016 1 commit
    • Manuel Grizonnet's avatar
      STYLE: Use ITK_NULLPTR to utilize c++11 features · 0f26e689
      Manuel Grizonnet authored
          Where available, use c++11 features to identify
          potential nullptr usage errors.
      
          python run-clang-tidy.py -clang-tidy-binary ~/software/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-tidy -checks=-*,modernize-use-nullptr -header-filter=/home/grizonnetm/projets/otb/src/OTB/Modules/.*/.*/include/.* -j8 -fix -p ~/projets/otb/bin/release/OTB-clang3.8/ ~/projets/otb/src/OTB/Modules/*/*/src/*.cxx ~/projets/otb/src/OTB/Modules/*/*/app/*.cxx ~/projets/otb/src/OTB/Examples/*/*.cxx ~/projets/otb/src/OTB/Modules/*/*/test/*.cxx > ~/temporary/run-clang-tidy-nullptr-log.txt
      
          find . -type f -print -name "*.h" -o -name "*.txx" -o -name "*.cxx" |xargs perl -pi -e 's/nullptr/ITK_NULLPTR/g'
      0f26e689
  7. 13 Jun, 2016 1 commit
    • Manuel Grizonnet's avatar
      ENH: Remove double underscore in header guards (.txx & __otb*_h form) · 82842d15
      Manuel Grizonnet authored
      Used the following command:
      
      find . \( -iname *.txx -and ! -path *ThirdParty* \) -exec perl -pi -w -e 's/__otb(.*)_txx/otb$1_txx/g;' {} \;
      find . \( -iname *.h -and ! -path *ThirdParty* \) -exec perl -pi -w -e 's/__otb(.*)_h/otb$1_h/g;' {} \;
      
      Fixes many, but not all, clang -Wreserved-id-macro warnings.
      82842d15
  8. 10 Jun, 2016 1 commit
    • Manuel Grizonnet's avatar
      ENH: Explicitly recognize virtual functions · 3de2b346
      Manuel Grizonnet authored
          clang-tidy tool can insert missing override keyword as a macro so that missing [optional] virtual identifiers can be easily added.
      
          build otb with clang 3.8 and use cmake option CMAKE_EXPORT_COMPILE_COMMANDS=ON. Most modules and third parties have been activated.
      
          #Save override occurences in otb code
          cd src/Modules ; grep -nR "override" * > ~/temporary/override_otb.txt
      
          #Run clang modernize check using utility script which allow to process the code in parallel
          python run-clang-tidy.py -clang-tidy-binary ~/software/clang+llvm-3.8.0-x86_64-linux-gnu-ubuntu-14.04/bin/clang-tidy -checks=-*,modernize-use-override -header-filter=/home/grizonnetm/projets/otb/src/OTB/Modules/.*/.*/include/.* -j8 -fix -p ~/projets/otb/bin/release/OTB-clang3.8/ ~/projets/otb/src/OTB/Modules/*/*/src/*.cxx ~/projets/otb/src/OTB/Examples/*/*.cxx ~/projets/otb/src/OTB/Modules/*/*/test/*.cxx > ~/temporary/run-clang-tidy-log.txt
      
          #Replace override by ITK macro (to maintain compat with c++98)
          find . -type f -print -name "*.h" -o -name "*.txx" |xargs perl -pi -e 's/\ override/\ ITK_OVERRIDE/g'
      3de2b346
  9. 27 Feb, 2015 2 commits
  10. 26 Feb, 2015 2 commits
  11. 24 Feb, 2015 1 commit
  12. 20 Feb, 2015 1 commit
  13. 19 Feb, 2015 1 commit
  14. 18 Feb, 2015 3 commits