Skip to content

Commit d50016b

Browse files
reyoungkexinzhao
authored andcommitted
Remove build warnings in float16.h (#8481)
1 parent c490f1b commit d50016b

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

paddle/fluid/platform/float16.h

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -74,17 +74,12 @@ struct PADDLE_ALIGN(2) float16 {
7474

7575
// The following defaulted special class member functions
7676
// are added to make float16 pass the std::is_trivial test
77-
HOSTDEVICE inline float16() = default;
78-
79-
HOSTDEVICE inline float16(const float16&) = default;
80-
81-
HOSTDEVICE inline float16& operator=(const float16&) = default;
82-
83-
HOSTDEVICE inline float16(float16&&) = default;
84-
85-
HOSTDEVICE inline float16& operator=(float16&&) = default;
86-
87-
HOSTDEVICE inline ~float16() = default;
77+
float16() = default;
78+
float16(const float16& o) = default;
79+
float16& operator=(const float16& o) = default;
80+
float16(float16&& o) = default;
81+
float16& operator=(float16&& o) = default;
82+
~float16() = default;
8883

8984
// Constructors
9085
#ifdef PADDLE_CUDA_FP16

0 commit comments

Comments
 (0)