Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: streaming for resample image filter in case of linear transforms #82

Conversation

romangrothausmann
Copy link
Member

@romangrothausmann romangrothausmann commented Oct 24, 2018

Inspired by the discussion of the discourse topic Why ResampleImageFilter is slow?, this PR is a try to realize streaming for at least some transforms for the itkResampleImageFilter.
It is one of the most general filters in ITK and much used and the essential one for isotropic down-sampling of large datasets. Especially for that case it would be very helpful to have streaming capabilities, in order to generate smaller datasets for filters that cannot stream. Apart from a reduced memory footprint, streaming can lead to a significant speed up because a chunk can be processed while the next is loaded from disc, drastically reducing loading latencies.

As the filter is of great importance, the idea is to first create some new test cases (failing with the current implementation) that are expected to succeed (partially) when streaming is realized. These tests are now merged from #392 and ready committed to the branch test_RSI-SDI (based on v4.13.1) and merged into streaming4ResampleImageFilter for testing the new contributions to itkResampleImageFilter, which enable streaming for linear transforms. Test showed that streaming already works but (even for an identity transform) the result's extent is larger than without streaming.

Therefore, itkResampleImageTest7 is meant to compare the current results of itkResampleImageFilter in various cases with those obtained when streaming is employed. There, a reader and a writer are avoided to rule out any interference concerning streaming limitations in respect to a chosen file format.
itkResampleImageTest2s is based on itkResampleImageTest2 adjusted to write MHAs, which support streaming.

@jhlegarreta
Copy link
Member

jhlegarreta commented Oct 27, 2018

@romangrothausmann

Thanks for the patches and the discussion !

I am not an expert in the way these filters were implemented, but others will hopefully chime in.

A few comments that also apply to #84 :

  • The transition to GitHub is still note completed, it might take a few days or weeks still. Meanwhile, we still use gerrit.
  • You may want to read the coding style section (Appendix 3) of the ITK SW Guide. Specifically, and although some residuals may still be around in the SW Guide or remote parts of the code:
    • We no longer use the keyword typedef, but use the C++11 friendly using. You may want to visit http://review.source.kitware.com/#/c/23103/ to see why.
    • Rather than using try / catch blocks, we have the TRY_EXPECT_NO_EXCEPTION macro that should be used in tests for the sake of readability. IT makes the code shorter also.
    • Other conventions (the use of the auto keyword, range-based loops, the use of nullptr, the override keyword, use of C++11 headers, etc.) may need to be applied to the code you contributed with also.

The above is not an exhaustive list. Hopefully, the ITK v5 migration guide provides further insight. Also you may find many useful scripts here to do the job for you.

Also, do not forget to stick to the commit message convention (ENH, DOC, etc.). Some of the commits are missing it.

Thanks !

@romangrothausmann
Copy link
Member Author

Thanks @jhlegarreta for looking at this and your comments.
I created a PR because @blowekamp asked for one, PR meant for me GH not gerrit (does gerrit have PRs?). Also, I'm waiting for GH because I'm not so familiar with gerrit (and the contribution is likely going to take some time before it is ready for a merge...).
It is not clear to me what code style changes are specific for a contribution to ITK-5 and which expected for a contribution to ITK-4.13.1. Mine here is specifically based on ITK-4 because I would need it for a project that is not (yet) ported to ITK-5. When it works for ITK-4 I would port it to ITK-5 and open a new PR.
Concerning the "commit message convention": I sometimes have difficulties to assign one of the given categories to a commit, e.g. what would be the right one for 0f962c5? ENH, BUG or all together WIP? In the end, I might consider squashing all commits into the first working commit (then using ENH) or is that not preferred?

@blowekamp
Copy link
Member

Thanks for creating the PR to share your code. I hope to get to this tomorrow afternoon. Thank you for you patience.

@romangrothausmann
Copy link
Member Author

Thanks for creating the PR to share your code. I hope to get to this tomorrow afternoon. Thank you for you patience.

Sure, no problem. The whole contribution is going to take some more time anyway and I am very thankful for any help and advice on this, especially since I am a bit lost on the problem with itkResampleImageTest7 and the change in output extent when streaming is employed.

@jhlegarreta
Copy link
Member

It is not clear to me what code style changes are specific for a contribution to ITK-5 and which expected for a contribution to ITK-4.13.1. Mine here is specifically based on ITK-4 because I would need it for a project that is not (yet) ported to ITK-5. When it works for ITK-4 I would port it to ITK-5 and open a new PR.

@romangrothausmann, true, you are right: I had completely neglected the intention to submit this to ITK 4.13.

Some of the comments concerning the use of macros (e.g. TRY_EXPECT_NO_EXCEPTION) are still valid, though.

But your roadmap sounds reasonable, yes ! Thanks for the explanation !

Concerning the "commit message convention": I sometimes have difficulties to assign one of the given categories to a commit, e.g. what would be the right one for 0f962c5? ENH, BUG or all together WIP? In the end, I might consider squashing all commits into the first working commit (then using ENH) or is that not preferred?

True, at times it is difficult to tell, especially when there are many changes, and the payload of making all of them separately is too high.

Squashing would be OK I guess.

@kwrobot kwrobot added temp and removed temp labels Nov 6, 2018
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Jan 24, 2019
itkResampleFilter does not support streaming for linear transforms GH PR InsightSoftwareConsortium#82
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Jan 24, 2019
…lter

Squashed commit of the following:

commit 6b59a58
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Thu Jan 24 10:28:29 2019 +0100

    ENH: new test are expected to fail as long as:

    itkResampleFilter does not support streaming for linear transforms GH PR InsightSoftwareConsortium#82

commit 9b63a48
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 14:45:46 2019 +0100

    ENH: improvements suggested by @jhlegarreta:

    see InsightSoftwareConsortium#84 (review)

commit 1b922ae
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Oct 23 08:26:39 2018 +0200

    ENH: mark resample as modified to enforce re-execution of filter chain

commit a6682b0
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 13:17:00 2019 +0100

    ENH: test for comparing output with stream driven imaging (SDI) and without

    based on itkWarpImageFilterTest2.cxx and itkResampleImageTest.cxx

commit ff8e5df
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Mon Oct 22 15:24:04 2018 +0200

    ENH: plain copy of itkResampleImageTest4.cxx and its cmake

commit 97f3073
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:16:55 2018 +0200

    ENH: verify streaming for linear case

commit 2e871f1
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:05:58 2018 +0200

    TEST: demand streaming and employ where possible

commit ca68f7f
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Sep 26 15:05:43 2018 +0200

    TEST: write MHAs (which support streaming) instead of PNGs

commit 56b6c25
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:57:59 2018 +0200

    TEST: employ itkResampleImageTest2s, still the same as itkResampleImageTest2

commit 4a20d6a
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:54:50 2018 +0200

    ENH: plain copy of itkResampleImageTest2.cxx and its cmake
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Jan 24, 2019
…lter

Squashed commit of the following:

commit e5d421f
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Thu Jan 24 10:28:29 2019 +0100

    ENH: new test are expected to fail as long as:

    itkResampleFilter does not support streaming for linear transforms GH PR InsightSoftwareConsortium#82

commit 6067a02
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 14:45:46 2019 +0100

    ENH: improvements suggested by @jhlegarreta:

    see InsightSoftwareConsortium#84 (review)

commit 4118d20
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Oct 23 08:26:39 2018 +0200

    ENH: mark resample as modified to enforce re-execution of filter chain

commit 375eac5
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 13:17:00 2019 +0100

    ENH: test for comparing output with stream driven imaging (SDI) and without

    based on itkWarpImageFilterTest2.cxx and itkResampleImageTest.cxx

commit a7f066a
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Mon Oct 22 15:24:04 2018 +0200

    ENH: plain copy of itkResampleImageTest4.cxx and its cmake

commit a7fbd1c
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Mon Oct 22 13:51:59 2018 +0200

    ENH: verify streaming is not possible for non-linear case

commit 21771f8
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:16:55 2018 +0200

    ENH: verify streaming for linear case

commit 1c66653
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:05:58 2018 +0200

    TEST: demand streaming and employ where possible

commit 89fd06c
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Sep 26 15:05:43 2018 +0200

    TEST: write MHAs (which support streaming) instead of PNGs

commit 18efabd
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:57:59 2018 +0200

    TEST: employ itkResampleImageTest2s, still the same as itkResampleImageTest2

commit c4d64b5
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:54:50 2018 +0200

    ENH: plain copy of itkResampleImageTest2.cxx and its cmake
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Jan 24, 2019
itkResampleFilter does not support streaming for linear transforms GH PR InsightSoftwareConsortium#82
thewtex pushed a commit to romangrothausmann/ITK that referenced this pull request Feb 4, 2019
…lter

New tests are expected to fail as long as itkResampleFilter does not
support streaming for linear transforms GH PR InsightSoftwareConsortium#82.

Also, tests for comparing output with stream driven imaging (SDI) and
without based on itkWarpImageFilterTest2.cxx and
itkResampleImageTest.cxx.
thewtex pushed a commit to romangrothausmann/ITK that referenced this pull request Feb 4, 2019
…lter

New tests are expected to fail as long as itkResampleFilter does not
support streaming for linear transforms GH PR InsightSoftwareConsortium#82.

Also, tests for comparing output with stream driven imaging (SDI) and
without based on itkWarpImageFilterTest2.cxx and
itkResampleImageTest.cxx.
@thewtex
Copy link
Member

thewtex commented Feb 5, 2019

@romangrothausmann could this please be rebased on master?

@thewtex thewtex requested a review from aylward February 5, 2019 00:55
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Feb 5, 2019
…lter

Squashed commit of the following:

commit e5d421f
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Thu Jan 24 10:28:29 2019 +0100

    ENH: new test are expected to fail as long as:

    itkResampleFilter does not support streaming for linear transforms GH PR InsightSoftwareConsortium#82

commit 6067a02
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 14:45:46 2019 +0100

    ENH: improvements suggested by @jhlegarreta:

    see InsightSoftwareConsortium#84 (review)

commit 4118d20
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Oct 23 08:26:39 2018 +0200

    ENH: mark resample as modified to enforce re-execution of filter chain

commit 375eac5
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 13:17:00 2019 +0100

    ENH: test for comparing output with stream driven imaging (SDI) and without

    based on itkWarpImageFilterTest2.cxx and itkResampleImageTest.cxx

commit a7f066a
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Mon Oct 22 15:24:04 2018 +0200

    ENH: plain copy of itkResampleImageTest4.cxx and its cmake

commit a7fbd1c
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Mon Oct 22 13:51:59 2018 +0200

    ENH: verify streaming is not possible for non-linear case

commit 21771f8
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:16:55 2018 +0200

    ENH: verify streaming for linear case

commit 1c66653
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:05:58 2018 +0200

    TEST: demand streaming and employ where possible

commit 89fd06c
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Sep 26 15:05:43 2018 +0200

    TEST: write MHAs (which support streaming) instead of PNGs

commit 18efabd
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:57:59 2018 +0200

    TEST: employ itkResampleImageTest2s, still the same as itkResampleImageTest2

commit c4d64b5
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:54:50 2018 +0200

    ENH: plain copy of itkResampleImageTest2.cxx and its cmake
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Feb 5, 2019
…lter

Squashed commit of the following:

commit e5d421f
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Thu Jan 24 10:28:29 2019 +0100

    ENH: new test are expected to fail as long as:

    itkResampleFilter does not support streaming for linear transforms GH PR InsightSoftwareConsortium#82

commit 6067a02
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 14:45:46 2019 +0100

    ENH: improvements suggested by @jhlegarreta:

    see InsightSoftwareConsortium#84 (review)

commit 4118d20
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Oct 23 08:26:39 2018 +0200

    ENH: mark resample as modified to enforce re-execution of filter chain

commit 375eac5
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Jan 23 13:17:00 2019 +0100

    ENH: test for comparing output with stream driven imaging (SDI) and without

    based on itkWarpImageFilterTest2.cxx and itkResampleImageTest.cxx

commit a7f066a
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Mon Oct 22 15:24:04 2018 +0200

    ENH: plain copy of itkResampleImageTest4.cxx and its cmake

commit a7fbd1c
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Mon Oct 22 13:51:59 2018 +0200

    ENH: verify streaming is not possible for non-linear case

commit 21771f8
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:16:55 2018 +0200

    ENH: verify streaming for linear case

commit 1c66653
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 15:05:58 2018 +0200

    TEST: demand streaming and employ where possible

commit 89fd06c
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Wed Sep 26 15:05:43 2018 +0200

    TEST: write MHAs (which support streaming) instead of PNGs

commit 18efabd
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:57:59 2018 +0200

    TEST: employ itkResampleImageTest2s, still the same as itkResampleImageTest2

commit c4d64b5
Author: Roman Grothausmann <romangrothausmann@users.noreply.github.com>
Date:   Tue Sep 25 14:54:50 2018 +0200

    ENH: plain copy of itkResampleImageTest2.cxx and its cmake
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Feb 5, 2019
…lter

New tests are expected to fail as long as itkResampleFilter does not
support streaming for linear transforms GH PR InsightSoftwareConsortium#82.

Also, tests for comparing output with stream driven imaging (SDI) and
without based on itkWarpImageFilterTest2.cxx and
itkResampleImageTest.cxx.
romangrothausmann added a commit to romangrothausmann/ITK that referenced this pull request Feb 5, 2019
@romangrothausmann
Copy link
Member Author

Sure. Rebased, adjusted and squashed (like for #392).

The individual commits are in https://github.com/romangrothausmann/ITK/commits/streaming4ResampleImageFilter_incr, in particular with romangrothausmann@2cdc0ee the streaming tests are now expected to pass.

@romangrothausmann
Copy link
Member Author

in particular with romangrothausmann/ITK@2cdc0ee the streaming tests are now expected to pass.

Which they do not.
In ResampleImageTest7 the monitor filter reports:
Down stream filter didn't execute PropagateRequestedRegion well
which could hint towards the problem I was experiencing before (https://discourse.itk.org/t/why-resampleimagefilter-is-slow/1217/17?u=grothausmann.roman), i.e. that the output extent is different with streaming.

@romangrothausmann
Copy link
Member Author

Just noticed that I can't change this PR to be for master now (not v4.13.1 as originally intended).
Therefore reset to old state and created a new PR #469.

Should this PR closed in favor of #469?

@thewtex
Copy link
Member

thewtex commented Feb 6, 2019

@romangrothausmann excellent. Yes, we can close this PR in favor of #469.

@thewtex thewtex closed this Feb 6, 2019
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request Dec 26, 2020
Fix typos in comments
CMakeLists.txt: Export all symbols (InsightSoftwareConsortium#136)
test/cctest/CMakeLists.txt: Added /bigobj for MSVC tests (InsightSoftwareConsortium#135)
Add DOUBLE_CONVERSION_HAS_ATTRIBUTE to fix warnings on MSVC and enable for GCC. (InsightSoftwareConsortium#131)
Fix broken MSVC builds. (InsightSoftwareConsortium#130)
Add support for quiet and signaling NaNs to the ieee header. (InsightSoftwareConsortium#128)
Move buffer and buffer_pos down (InsightSoftwareConsortium#125)
    * Move buffer and buffer_pos down
    Simplifies code by removing two asserts
    Optimize code with -ftrivial-auto-var-init=pattern by avoiding initialization when buffer is not used
    * Disable -ftrivial-auto-var-init=pattern for a large buffer

Fix strtod.cc undefined constants (InsightSoftwareConsortium#123)
    When DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is not defined
    there is a build error when -Wall -Werror enabled because
    kMaxExactDoubleIntegerDecimalDigits, exact_powers_of_ten and
    kExactPowersOfTenSize are used only in else branch of this define
    (when it's defined).
    Fixes google/double-conversion#122

Add full license to test .cc files missing it. (InsightSoftwareConsortium#121)
    Some files in cctest had a 1-line copyright that doesn't list the
    license. This copies the project license to those files, preserving the
    date.

Add wasm32 as supported platform (InsightSoftwareConsortium#120)
    Summary:
    Emscripten is already included, adding wasm32 the same way for when
    build with "plain" clang wasm32 (without emscripten)

Pseiderer/add nios2 and xtensa 001 (InsightSoftwareConsortium#119)
    * double-conversion: enable for nios2
    Nios2 supports double conversion, tested using qemu:

Add support for microblaze.
Add support for e2k architecture. (InsightSoftwareConsortium#118)
Add min exponent width option in double-to-string conversion (InsightSoftwareConsortium#116)

Remove reference to `diy-fp.cc`
    That file was removed in a previous commit.

More Bignum fiddling. (InsightSoftwareConsortium#108)
    * Char has size 1.
    * More const.
    * Allow inlining.
    * Compact Bignum sizes.
    * Consistent naming.

Remove redundant parenthesis.
    Reported by seanm (github).

Optimise Bignum layout. (InsightSoftwareConsortium#107)
    * Use memset to clear bignum.
    * Improve data locality.
    * Reduce size of bignum.

Split Strtod() (InsightSoftwareConsortium#106)
    Add `StrtodTrimmed` method, exposing a later stage of the conversion pipeline.
    Some tools can do the first stage outside of the double-conversion library and would prefer not to pay the cost of doing it again.

Split double-conversion. (InsightSoftwareConsortium#104)
    Separates the two main classes into separate c and h files.
    Fix naming. (InsightSoftwareConsortium#103)
    Fix naming of `case_insensibility` to `case_insensitivity`.

Consistent macro prefix. (InsightSoftwareConsortium#101)

Use standard min/max. (InsightSoftwareConsortium#102)

Fix some issues with invalid hex-float literals.
    When converting `0x` the converter would assert (or access out of
        boundary).
    With `0x1.p1234556666FFFFF` the converter would overflow and not yield
    the correct exponent.

Usefulcat master (InsightSoftwareConsortium#98)
    * minor bug fix: use free() instead of delete[] to free memory allocated by strdup()
    * fix for uninitialized variable problem found by valgrind
    * disable assertions for 'optimize' build
    * removed -g option that was inadvertently added to CCFLAGS
    * ignore generated files

    Fix warning for g++ 4.9.3.

CMake: install to correct lib dir (InsightSoftwareConsortium#93)
    64-bit libraries should be installed in /usr/lib64, not in /usr/lib/
    Make the destination lib dir configurable.

Add big endian ARM support (InsightSoftwareConsortium#92)
    This fixes compilation on such platforms.

Switch to relative includes.
Fix 16-bit separators.

msvc: check if _MSC_VER is defined (InsightSoftwareConsortium#88)

Allow for compilation in emscripten (InsightSoftwareConsortium#86)
    Support emscripten

Add test cases.
    Fixes InsightSoftwareConsortium#62

Add support of ARC architecture (InsightSoftwareConsortium#82)
    More info about ARC architecture is here: [1] & [2].
    We need ARC supported here for many things like:
     - ICU (see [3])
     - Qt5 etc

Fix hex literal bug.
    Large hex literals would lose their minus sign.

Support separator characters.
Add support for hexadecimal float literals.
Fix bug where hex numbers would lose the minus sign.

Add comments for achitecture check.
    This should make it easier to add new architectures.

Add support for aarch64_be, or1k and microblazebe.
Add support for Windows on ARM and ARM64 (InsightSoftwareConsortium#76)

Use `static_assert` with newer compilers.
Add Native Client as support architecture.
Avoid undefined cast to make ASAN happy.
Avoid undefined cast to make ASAN happy.
Add `exports_files`
Processed length should include no trailing junk (InsightSoftwareConsortium#63)

Clarify output charset in DoubleToAscii documentation (InsightSoftwareConsortium#61)
    * Clarify output charset in DoubleToAscii documentation
    * Fixing typo in charset docs.

Fix warning for code that will never be executed (InsightSoftwareConsortium#59)

Rename macros.
    Renamed DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS to
    DC_DISALLOW_COPY_AND_ASSIGN and DC_DISALLOW_IMPLICIT_CONSTRUCTORS.

    This makes it easier to use this library in projects that have macros
    with the same name (as is common in Google).

Some refactorings: remove unused static, replace deprecated headers, init member in constructor
    REF: replace deprecated headers
    REF: meaningless static definition in anonymous namespace
    REF: init member in constructor

Fix typo in variable name.

Suppress issue in clang analyzer.
CMake fixes.
    Remove unused CMake file.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter c…

Remove unnecessary INSTALL_INTERFACE expression.

Use template for CMake installation.

Fix mistake for build interface include dir.

Improve CMake changes.
    Update CMake package generation.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter class

Add assert and test.

Avoid negative shift.
    When filling in fractional digits in a fixed representation we
    might use all existing digits. When this happens, we can not look
    at the next digit to see if we should round up.
    Before this fix, we tried to shift by a negative amount to see if the
    (non-existing) next bit was set to 1 (requiring the number to be rounded up).
hjmjohnson added a commit to hjmjohnson/ITK that referenced this pull request Dec 26, 2020
Fix typos in comments
CMakeLists.txt: Export all symbols (InsightSoftwareConsortium#136)
test/cctest/CMakeLists.txt: Added /bigobj for MSVC tests (InsightSoftwareConsortium#135)
Add DOUBLE_CONVERSION_HAS_ATTRIBUTE to fix warnings on MSVC and enable for GCC. (InsightSoftwareConsortium#131)
Fix broken MSVC builds. (InsightSoftwareConsortium#130)
Add support for quiet and signaling NaNs to the ieee header. (InsightSoftwareConsortium#128)
Move buffer and buffer_pos down (InsightSoftwareConsortium#125)
    * Move buffer and buffer_pos down
    Simplifies code by removing two asserts
    Optimize code with -ftrivial-auto-var-init=pattern by avoiding initialization when buffer is not used
    * Disable -ftrivial-auto-var-init=pattern for a large buffer

Fix strtod.cc undefined constants (InsightSoftwareConsortium#123)
    When DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is not defined
    there is a build error when -Wall -Werror enabled because
    kMaxExactDoubleIntegerDecimalDigits, exact_powers_of_ten and
    kExactPowersOfTenSize are used only in else branch of this define
    (when it's defined).
    Fixes google/double-conversion#122

Add full license to test .cc files missing it. (InsightSoftwareConsortium#121)
    Some files in cctest had a 1-line copyright that doesn't list the
    license. This copies the project license to those files, preserving the
    date.

Add wasm32 as supported platform (InsightSoftwareConsortium#120)
    Summary:
    Emscripten is already included, adding wasm32 the same way for when
    build with "plain" clang wasm32 (without emscripten)

Pseiderer/add nios2 and xtensa 001 (InsightSoftwareConsortium#119)
    * double-conversion: enable for nios2
    Nios2 supports double conversion, tested using qemu:

Add support for microblaze.
Add support for e2k architecture. (InsightSoftwareConsortium#118)
Add min exponent width option in double-to-string conversion (InsightSoftwareConsortium#116)

Remove reference to `diy-fp.cc`
    That file was removed in a previous commit.

More Bignum fiddling. (InsightSoftwareConsortium#108)
    * Char has size 1.
    * More const.
    * Allow inlining.
    * Compact Bignum sizes.
    * Consistent naming.

Remove redundant parenthesis.
    Reported by seanm (github).

Optimise Bignum layout. (InsightSoftwareConsortium#107)
    * Use memset to clear bignum.
    * Improve data locality.
    * Reduce size of bignum.

Split Strtod() (InsightSoftwareConsortium#106)
    Add `StrtodTrimmed` method, exposing a later stage of the conversion pipeline.
    Some tools can do the first stage outside of the double-conversion library and would prefer not to pay the cost of doing it again.

Split double-conversion. (InsightSoftwareConsortium#104)
    Separates the two main classes into separate c and h files.
    Fix naming. (InsightSoftwareConsortium#103)
    Fix naming of `case_insensibility` to `case_insensitivity`.

Consistent macro prefix. (InsightSoftwareConsortium#101)

Use standard min/max. (InsightSoftwareConsortium#102)

Fix some issues with invalid hex-float literals.
    When converting `0x` the converter would assert (or access out of
        boundary).
    With `0x1.p1234556666FFFFF` the converter would overflow and not yield
    the correct exponent.

Usefulcat master (InsightSoftwareConsortium#98)
    * minor bug fix: use free() instead of delete[] to free memory allocated by strdup()
    * fix for uninitialized variable problem found by valgrind
    * disable assertions for 'optimize' build
    * removed -g option that was inadvertently added to CCFLAGS
    * ignore generated files

    Fix warning for g++ 4.9.3.

CMake: install to correct lib dir (InsightSoftwareConsortium#93)
    64-bit libraries should be installed in /usr/lib64, not in /usr/lib/
    Make the destination lib dir configurable.

Add big endian ARM support (InsightSoftwareConsortium#92)
    This fixes compilation on such platforms.

Switch to relative includes.
Fix 16-bit separators.

msvc: check if _MSC_VER is defined (InsightSoftwareConsortium#88)

Allow for compilation in emscripten (InsightSoftwareConsortium#86)
    Support emscripten

Add test cases.
    Fixes InsightSoftwareConsortium#62

Add support of ARC architecture (InsightSoftwareConsortium#82)
    More info about ARC architecture is here: [1] & [2].
    We need ARC supported here for many things like:
     - ICU (see [3])
     - Qt5 etc

Fix hex literal bug.
    Large hex literals would lose their minus sign.

Support separator characters.
Add support for hexadecimal float literals.
Fix bug where hex numbers would lose the minus sign.

Add comments for achitecture check.
    This should make it easier to add new architectures.

Add support for aarch64_be, or1k and microblazebe.
Add support for Windows on ARM and ARM64 (InsightSoftwareConsortium#76)

Use `static_assert` with newer compilers.
Add Native Client as support architecture.
Avoid undefined cast to make ASAN happy.
Avoid undefined cast to make ASAN happy.
Add `exports_files`
Processed length should include no trailing junk (InsightSoftwareConsortium#63)

Clarify output charset in DoubleToAscii documentation (InsightSoftwareConsortium#61)
    * Clarify output charset in DoubleToAscii documentation
    * Fixing typo in charset docs.

Fix warning for code that will never be executed (InsightSoftwareConsortium#59)

Rename macros.
    Renamed DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS to
    DC_DISALLOW_COPY_AND_ASSIGN and DC_DISALLOW_IMPLICIT_CONSTRUCTORS.

    This makes it easier to use this library in projects that have macros
    with the same name (as is common in Google).

Some refactorings: remove unused static, replace deprecated headers, init member in constructor
    REF: replace deprecated headers
    REF: meaningless static definition in anonymous namespace
    REF: init member in constructor

Fix typo in variable name.

Suppress issue in clang analyzer.
CMake fixes.
    Remove unused CMake file.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter c…

Remove unnecessary INSTALL_INTERFACE expression.

Use template for CMake installation.

Fix mistake for build interface include dir.

Improve CMake changes.
    Update CMake package generation.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter class

Add assert and test.

Avoid negative shift.
    When filling in fractional digits in a fixed representation we
    might use all existing digits. When this happens, we can not look
    at the next digit to see if we should round up.
    Before this fix, we tried to shift by a negative amount to see if the
    (non-existing) next bit was set to 1 (requiring the number to be rounded up).
hjmjohnson added a commit that referenced this pull request Dec 28, 2020
Fix typos in comments
CMakeLists.txt: Export all symbols (#136)
test/cctest/CMakeLists.txt: Added /bigobj for MSVC tests (#135)
Add DOUBLE_CONVERSION_HAS_ATTRIBUTE to fix warnings on MSVC and enable for GCC. (#131)
Fix broken MSVC builds. (#130)
Add support for quiet and signaling NaNs to the ieee header. (#128)
Move buffer and buffer_pos down (#125)
    * Move buffer and buffer_pos down
    Simplifies code by removing two asserts
    Optimize code with -ftrivial-auto-var-init=pattern by avoiding initialization when buffer is not used
    * Disable -ftrivial-auto-var-init=pattern for a large buffer

Fix strtod.cc undefined constants (#123)
    When DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS is not defined
    there is a build error when -Wall -Werror enabled because
    kMaxExactDoubleIntegerDecimalDigits, exact_powers_of_ten and
    kExactPowersOfTenSize are used only in else branch of this define
    (when it's defined).
    Fixes google/double-conversion#122

Add full license to test .cc files missing it. (#121)
    Some files in cctest had a 1-line copyright that doesn't list the
    license. This copies the project license to those files, preserving the
    date.

Add wasm32 as supported platform (#120)
    Summary:
    Emscripten is already included, adding wasm32 the same way for when
    build with "plain" clang wasm32 (without emscripten)

Pseiderer/add nios2 and xtensa 001 (#119)
    * double-conversion: enable for nios2
    Nios2 supports double conversion, tested using qemu:

Add support for microblaze.
Add support for e2k architecture. (#118)
Add min exponent width option in double-to-string conversion (#116)

Remove reference to `diy-fp.cc`
    That file was removed in a previous commit.

More Bignum fiddling. (#108)
    * Char has size 1.
    * More const.
    * Allow inlining.
    * Compact Bignum sizes.
    * Consistent naming.

Remove redundant parenthesis.
    Reported by seanm (github).

Optimise Bignum layout. (#107)
    * Use memset to clear bignum.
    * Improve data locality.
    * Reduce size of bignum.

Split Strtod() (#106)
    Add `StrtodTrimmed` method, exposing a later stage of the conversion pipeline.
    Some tools can do the first stage outside of the double-conversion library and would prefer not to pay the cost of doing it again.

Split double-conversion. (#104)
    Separates the two main classes into separate c and h files.
    Fix naming. (#103)
    Fix naming of `case_insensibility` to `case_insensitivity`.

Consistent macro prefix. (#101)

Use standard min/max. (#102)

Fix some issues with invalid hex-float literals.
    When converting `0x` the converter would assert (or access out of
        boundary).
    With `0x1.p1234556666FFFFF` the converter would overflow and not yield
    the correct exponent.

Usefulcat master (#98)
    * minor bug fix: use free() instead of delete[] to free memory allocated by strdup()
    * fix for uninitialized variable problem found by valgrind
    * disable assertions for 'optimize' build
    * removed -g option that was inadvertently added to CCFLAGS
    * ignore generated files

    Fix warning for g++ 4.9.3.

CMake: install to correct lib dir (#93)
    64-bit libraries should be installed in /usr/lib64, not in /usr/lib/
    Make the destination lib dir configurable.

Add big endian ARM support (#92)
    This fixes compilation on such platforms.

Switch to relative includes.
Fix 16-bit separators.

msvc: check if _MSC_VER is defined (#88)

Allow for compilation in emscripten (#86)
    Support emscripten

Add test cases.
    Fixes #62

Add support of ARC architecture (#82)
    More info about ARC architecture is here: [1] & [2].
    We need ARC supported here for many things like:
     - ICU (see [3])
     - Qt5 etc

Fix hex literal bug.
    Large hex literals would lose their minus sign.

Support separator characters.
Add support for hexadecimal float literals.
Fix bug where hex numbers would lose the minus sign.

Add comments for achitecture check.
    This should make it easier to add new architectures.

Add support for aarch64_be, or1k and microblazebe.
Add support for Windows on ARM and ARM64 (#76)

Use `static_assert` with newer compilers.
Add Native Client as support architecture.
Avoid undefined cast to make ASAN happy.
Avoid undefined cast to make ASAN happy.
Add `exports_files`
Processed length should include no trailing junk (#63)

Clarify output charset in DoubleToAscii documentation (#61)
    * Clarify output charset in DoubleToAscii documentation
    * Fixing typo in charset docs.

Fix warning for code that will never be executed (#59)

Rename macros.
    Renamed DISALLOW_COPY_AND_ASSIGN and DISALLOW_IMPLICIT_CONSTRUCTORS to
    DC_DISALLOW_COPY_AND_ASSIGN and DC_DISALLOW_IMPLICIT_CONSTRUCTORS.

    This makes it easier to use this library in projects that have macros
    with the same name (as is common in Google).

Some refactorings: remove unused static, replace deprecated headers, init member in constructor
    REF: replace deprecated headers
    REF: meaningless static definition in anonymous namespace
    REF: init member in constructor

Fix typo in variable name.

Suppress issue in clang analyzer.
CMake fixes.
    Remove unused CMake file.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter c…

Remove unnecessary INSTALL_INTERFACE expression.

Use template for CMake installation.

Fix mistake for build interface include dir.

Improve CMake changes.
    Update CMake package generation.

Implement ALLOW_CASE_INSENSIBILITY mode for StringToDoubleConverter class

Add assert and test.

Avoid negative shift.
    When filling in fractional digits in a fixed representation we
    might use all existing digits. When this happens, we can not look
    at the next digit to see if we should round up.
    Before this fix, we tried to shift by a negative amount to see if the
    (non-existing) next bit was set to 1 (requiring the number to be rounded up).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants