diff options
author | 2016-03-16 12:20:34 -0800 | |
---|---|---|
committer | 2016-03-16 16:21:58 -0700 | |
commit | 4c85a08666796faad743a47b63d350132d5c0c90 (patch) | |
tree | 5aa1c52226c40994493f755954e79ddbca24c57a /tensorflow/core/framework/tensor_testutil.h | |
parent | f1bccd320a742c67245ded0cbe5eba971294d769 (diff) |
Rollforward of "Merge changes from github."
Change: 117375570
Diffstat (limited to 'tensorflow/core/framework/tensor_testutil.h')
-rw-r--r-- | tensorflow/core/framework/tensor_testutil.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tensorflow/core/framework/tensor_testutil.h b/tensorflow/core/framework/tensor_testutil.h index 71e1767924..8d14c25261 100644 --- a/tensorflow/core/framework/tensor_testutil.h +++ b/tensorflow/core/framework/tensor_testutil.h @@ -127,6 +127,12 @@ inline void ExpectEqual<complex64>(const complex64& a, const complex64& b) { EXPECT_FLOAT_EQ(a.imag(), b.imag()) << a << " vs. " << b; } +template <> +inline void ExpectEqual<complex128>(const complex128& a, const complex128& b) { + EXPECT_DOUBLE_EQ(a.real(), b.real()) << a << " vs. " << b; + EXPECT_DOUBLE_EQ(a.imag(), b.imag()) << a << " vs. " << b; +} + inline void AssertSameTypeDims(const Tensor& x, const Tensor& y) { ASSERT_EQ(x.dtype(), y.dtype()); ASSERT_TRUE(x.IsSameSize(y)) |