Commits


Kenta Murata authored and Antoine Pitrou committed cef82b41f50
ARROW-5830: [C++] Stop using memcmp in TensorEquals for tensors with float values `memcmp` is an inappropriate way to examine the equality of float tensors because float tensors can have NaNs. In addition to fix this issue, I made the following fixes in this pull request: - Change the namespace of `StridedIntegerTensorContentsEquals`, that is renamed from `StridedTensorContentsEquals`, to anonymous because it isn't referred from the outside of compare.cc - Let the result of `Tensor::Equals` be false when two tensors has the different shapes. Closes #5166 from mrkn/ARROW-5830 and squashes the following commits: a74ad034c <Kenta Murata> Fix Tensor::Equals for zero-sized tensors 7357658ad <Kenta Murata> Support EqualOptions in Tensor::Equals 20269da7b <Kenta Murata> Add test case for Tensor of FloatType bde8ff8be <Kenta Murata> Fix code format 3a531009b <Kenta Murata> Perform trivial optimization 2fbf8558a <Kenta Murata> Prevent compilation warning 71306f8f7 <Kenta Murata> Fix code format cccdb6efd <Kenta Murata> Add static assert to prevent wrong instantiation of FloatTensorEquals<T>() 27dd1bab7 <Kenta Murata> Fix Tensor::Equals for float tensors with NaNs 522721c20 <Kenta Murata> Add an assertion for same data and different shape c97aeb551 <Kenta Murata> Split TensorEquals into IntegerTensorEquals and FloatTensorEquals 05f1b189a <Kenta Murata> Write test of tensors with float values 601b27996 <Kenta Murata> Modify tensor-test to check equality between different memories Authored-by: Kenta Murata <mrkn@mrkn.jp> Signed-off-by: Antoine Pitrou <antoine@python.org>