From d50016b2a74dc9b5ae42012232a3f1cef29f2f8f Mon Sep 17 00:00:00 2001 From: Yu Yang Date: Fri, 23 Feb 2018 01:51:44 +0800 Subject: [PATCH] Remove build warnings in float16.h (#8481) --- paddle/fluid/platform/float16.h | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/paddle/fluid/platform/float16.h b/paddle/fluid/platform/float16.h index cf6a4b09db..5832bd9ce3 100644 --- a/paddle/fluid/platform/float16.h +++ b/paddle/fluid/platform/float16.h @@ -74,17 +74,12 @@ struct PADDLE_ALIGN(2) float16 { // The following defaulted special class member functions // are added to make float16 pass the std::is_trivial test - HOSTDEVICE inline float16() = default; - - HOSTDEVICE inline float16(const float16&) = default; - - HOSTDEVICE inline float16& operator=(const float16&) = default; - - HOSTDEVICE inline float16(float16&&) = default; - - HOSTDEVICE inline float16& operator=(float16&&) = default; - - HOSTDEVICE inline ~float16() = default; + float16() = default; + float16(const float16& o) = default; + float16& operator=(const float16& o) = default; + float16(float16&& o) = default; + float16& operator=(float16&& o) = default; + ~float16() = default; // Constructors #ifdef PADDLE_CUDA_FP16 -- GitLab