Skip to content

WIP: Add a PrintHelper file to overload boolean and vector printing.#103

Closed
hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:masterfrom
hjmjohnson:EnhancePrintingCapabilities
Closed

WIP: Add a PrintHelper file to overload boolean and vector printing.#103
hjmjohnson wants to merge 1 commit intoInsightSoftwareConsortium:masterfrom
hjmjohnson:EnhancePrintingCapabilities

Conversation

@hjmjohnson
Copy link
Copy Markdown
Member

No description provided.

@hjmjohnson
Copy link
Copy Markdown
Member Author

http://review.source.kitware.com/#/c/22069/5

Jon Hait... Gorroño
Uploaded patch set 1.Feb 12, 2017

Jon Hait... Gorroño
Patch Set 1: Very first version. The approach is very likely not to be the best one. I used macros instead of classes, and I'm seeing its limitations. If you definitely think we should use classes, feel free to continue the discussion. Thanks.Feb 12, 2017

Kitware Build Robot
Patch Set 1: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=22069-1&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Feb 12, 2017

Jon Hait... Gorroño
Uploaded patch set 2.Sep 23 1:10 PM

Jon Hait... Gorroño
Patch Set 2: Actually, cross-referencing the comment here: http://review.source.kitware.com/#/c/23725/1 I had started this a long, long time ago, but did not invest more time on it :-S Some comments: Brad's addition was actually being exercised according to the coverage. However, a quick search for itk::ImageIOBase::Pointer gave: ITK\Modules\Filtering\FFT\test\itkComplexToComplexFFTImageFilterTest.cxx(103) ITK\Modules\Filtering\FFT\test\itkVnlComplexToComplexFFTImageFilterTest.cxx(85) ITK\Modules\IO\GE\test\itkGEImageIOTest.cxx(91) ITK\Modules\IO\ImageBase\test\itkImageIOBaseTest.cxx(200) ITK\Modules\IO\ImageBase\test\itkVectorImageReadWriteTest.cxx(115) ITK\Modules\Filtering\ImageGradient\test\itkGradientImageFilterTest2.cxx(112) ITK\Modules\Segmentation\LabelVoting\test\itkVotingBinaryImageFilterTest.cxx(100) The one in itkImageIOBaseTest cannot be used because the instance is null. For the rest, the problem is that the base class is only known at runtime, so we cannot do: EXERCISE_BASIC_OBJECT_METHODS( ioBase, ioBase->GetNameOfClass(), LightProcessObject ); So I could not really check that the solution was working. If anyone has suggestions, I'd be happy to try. As for the booleans, I simply did not find the way to overload the << operator without incurring in a "more than one operator matches these operands" error. Thanks.Sep 23 1:21 PM

Kitware Build Robot
Patch Set 2: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=22069-2&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Sep 23 1:22 PM

Jon Hait... Gorroño
Uploaded patch set 3.Sep 23 1:40 PM

Kitware Build Robot
Patch Set 3: Verified-1 Build Failed: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=22069-3&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Sep 23 1:53 PM

Jon Hait... Gorroño
Uploaded patch set 4.Sep 23 2:04 PM

Kitware Build Robot
Patch Set 4: Verified+1 Build Successful: CDash filtered results: https://open.cdash.org/index.php?&project=Insight&filtercount=3&field1=buildname/string&compare1=63&value1=22069-4&field2=buildstarttime/date&compare2=83&value2=2015-03-01&field3=buildstarttime/date&compare3=84&value3=2029-01-01Sep 23 2:16 PM

Dzenan Zukic
Patch Set 4: Code-Review+2 Excellent! The next step would be to find instanced of "manually" printing vectors, and simplify them by using this mechanism. But that should be a new patch!Sep 24 9:02 AM

Hans J. Johnson
Patch Set 4: Code-Review+1 Let's get this out of WIP mode.Sep 24 9:20 AM

Jon Hait... Gorroño
Uploaded patch set 5: Commit message was updated.Sep 25 7:43 PM

Jon Hait... Gorroño
Patch Set 5: I updated the commit message. Dzenan, definitely, yes, I'll need to look for instances of PrintSelf where this can save code. Also, I'll take the work of adding more features (lists, maps, booleans) to another topic.Sep 25 7:44 PM

Dzenan Zukic
Patch Set 5: Code-Review+2Sep 26 7:50 AM

Bradley Lowekamp
Patch Set 5: With this approach all overloaded operator<< done in the itk name space scope will get this overload. Perhaps we should consider requiring to opt in to the the "print helpers". If we place them is a sub-namespace say "itk::print_helper". The we could just add "using print_helper" to the PrintSelf method to opt into using these methods. Similarly, outside programs could do a "using itk::print_helper" and get these overloaded operators too.Sep 26 8:05 AM

Jon Hait... Gorroño

@hjmjohnson hjmjohnson requested a review from blowekamp November 5, 2018 22:42
Copy link
Copy Markdown
Member Author

@hjmjohnson hjmjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jhlegarreta
@blowekamp stated "With this approach all overloaded operator<< done in the itk name space scope will get this overload. Perhaps we should consider requiring to opt in to the the "print helpers". If we place them is a sub-namespace say "itk::print_helper". The we could just add "using print_helper" to the PrintSelf method to opt into using these methods. Similarly, outside programs could do a "using itk::print_helper" and get these overloaded operators too."

Can this be completed?

@jhlegarreta
Copy link
Copy Markdown
Member

Thanks for the comment; still in my ToDo list.

@hjmjohnson hjmjohnson closed this Nov 6, 2018
@hjmjohnson hjmjohnson deleted the EnhancePrintingCapabilities branch November 6, 2018 14:49
@hjmjohnson hjmjohnson restored the EnhancePrintingCapabilities branch November 6, 2018 19:25
@hjmjohnson
Copy link
Copy Markdown
Member Author

Accidently deleted/closed branch when the script for moving from Gerrit went haywire.

@hjmjohnson hjmjohnson reopened this Nov 6, 2018
@hjmjohnson hjmjohnson changed the title ENH: Add a PrintHelper file to overload boolean and vector printing. WIP: Add a PrintHelper file to overload boolean and vector printing. Nov 7, 2018
Add a new `itkPrintHelper.h` file to help in printing std::vectors.

Change-Id: I2306c8bf44cd0cec9661c3515c0a77cfbc34ea88
@hjmjohnson hjmjohnson force-pushed the EnhancePrintingCapabilities branch from 54f2c04 to 271673c Compare February 9, 2019 19:53
@kwrobot-v1
Copy link
Copy Markdown

kwrobot-v1 Bot commented Feb 9, 2019

Errors:

  • Failed to reserve ref 271673c for the merge request: invalid git ref: 'no such commit'.
  • Failed to run the checks: git error: failed to list commits on the merge request https://github.com/InsightSoftwareConsortium/ITK/pull/103: fatal: bad object 271673cdcd960b337b5d31507858b28f1e9417f9 .

@hjmjohnson
Copy link
Copy Markdown
Member Author

@jhlegarreta This seems like some low-hanging fruit. Any change it can be taken to completion and off the to todo list?

@jhlegarreta
Copy link
Copy Markdown
Member

@hjmjohnson thanks for the interest.

I'd love to get this done, see it merged, and reduce my ToDo list by one item. For this to happen, I need the help from a few though, since the best design choice to get this done is still unclear to me.

@phcerdan
Copy link
Copy Markdown
Contributor

phcerdan commented Feb 10, 2019

I don't think overload of operator << of classes that ITK does not own is a good practice

What about anstd::string itk::to_string(const std::vector &) function in this header? There is a std::to_string already, but only for scalars.

Usage:

std::cout << "My vector: " << itk::to_string(myVector) << std::endl;

@blowekamp
Copy link
Copy Markdown
Member

@phcerdan I think we are in some agreement that by default overloading operator<< and making it default accessible is not the best thing to do. I'm not sure how much weight to put into that one SO response, here is a blog article on doing it.

My suggestions is to:

namespace itk {
namespace to_string {
	template< typename T >
	std::ostream & operator<<( std::ostream & os, const std::vector< T >& v );
}
}

Then usage would be:

namespace itk
{
 void something(void)
{
using to_string;
std::cout << "My vector: " << myVector << std::endl;
}
}

For both these approaches argument dependent lookup does not work, since we can't (must not) put the function/operator into the std namespace.

@jhlegarreta
Copy link
Copy Markdown
Member

Thanks @phcerdan @blowekamp !

Both approaches seem fair to me, and I have no preference, beyond may be keeping the code style consistent.

IMHO, Brad's solution is cleaner when calling the stream insertion operator.

However, I ignore whether placing the using to_string in the corresponding method (usually, this will be intended to be used in the PrintSelf members) is a price to pay (in terms of code readability or style) that we all agree on.

I ignore whether Pablo's solution has any downside or caveat.

@phcerdan
Copy link
Copy Markdown
Contributor

phcerdan commented Feb 10, 2019

Yeah, Brad's solution sounds good to me, thanks for that Brad.
After reading more about it, using a function instead of a iostream has the caveat of not being able to control the number of digits used in the conversion in an easy way.

+1 for putting the << overload in itk::print_helpers namespace or similar.

@jhlegarreta
Copy link
Copy Markdown
Member

Thanks for the comments and suggestions !

I'll then come up with a new patch set hopefully by the end of the week.

@jhlegarreta
Copy link
Copy Markdown
Member

Superseded by #512. Closing.

@hjmjohnson hjmjohnson deleted the EnhancePrintingCapabilities branch October 23, 2019 13:30
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.

4 participants