aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/tensor_testutil.h
diff options
context:
space:
mode:
authorGravatar Geoffrey Irving <geoffreyi@google.com>2016-03-16 12:20:34 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-03-16 16:21:58 -0700
commit4c85a08666796faad743a47b63d350132d5c0c90 (patch)
tree5aa1c52226c40994493f755954e79ddbca24c57a /tensorflow/core/framework/tensor_testutil.h
parentf1bccd320a742c67245ded0cbe5eba971294d769 (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.h6
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))