From d5bc2a8058c79d3a2d5fc9c9a186a78de3342d70 Mon Sep 17 00:00:00 2001 From: Xiang Gao Date: Tue, 18 Aug 2020 15:19:48 -0700 Subject: [PATCH] Remove std::complex from c10::Half (#39833) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/39833 Reviewed By: mrshenli Differential Revision: D22644987 Pulled By: anjali411 fbshipit-source-id: 5ae5db10b12d410560eca43234efa04b711a639c --- c10/util/Half.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c10/util/Half.h b/c10/util/Half.h index 2414a697cce..3e9302e0764 100644 --- a/c10/util/Half.h +++ b/c10/util/Half.h @@ -372,9 +372,9 @@ struct alignas(4) complex { Half imag() const { return imag_; } - inline complex(std::complex value) + inline complex(c10::complex value) : real_(value.real()), imag_(value.imag()) {} - inline operator std::complex() const { + inline operator c10::complex() const { return {real_, imag_}; } };