diff --git a/paddle/fluid/platform/macros.h b/paddle/fluid/platform/macros.h index 2ea58a7bb0c818e940c26111af06b9fc1c7b8d34..3f854d40b8b23cce95ce979cea08d6f1a9c90aec 100644 --- a/paddle/fluid/platform/macros.h +++ b/paddle/fluid/platform/macros.h @@ -14,18 +14,4 @@ limitations under the License. */ #pragma once -// Disable the copy and assignment operator for a class. -#ifndef DISABLE_COPY_AND_ASSIGN -#define DISABLE_COPY_AND_ASSIGN(classname) \ - private: \ - classname(const classname&) = delete; \ - classname(classname&&) = delete; \ - classname& operator=(const classname&) = delete; \ - classname& operator=(classname&&) = delete -#endif - -#ifndef PADDLE_WITH_MUSL -#if defined(__FLT_MAX__) -#define FLT_MAX __FLT_MAX__ -#endif // __FLT_MAX__ -#endif // PADDLE_WITH_MUSL +#include "paddle/phi/core/macros.h" diff --git a/paddle/phi/core/macros.h b/paddle/phi/core/macros.h index e48f7342e456ec1ae766c4ca9a4a2ced09f394e7..2e783574927341b53d0abbb1033fe88443079960 100644 --- a/paddle/phi/core/macros.h +++ b/paddle/phi/core/macros.h @@ -59,4 +59,10 @@ namespace phi { #define PADDLE_RESTRICT #endif +#ifndef PADDLE_WITH_MUSL +#if defined(__FLT_MAX__) +#define FLT_MAX __FLT_MAX__ +#endif // __FLT_MAX__ +#endif // PADDLE_WITH_MUSL + } // namespace phi diff --git a/paddle/phi/kernels/funcs/pooling.h b/paddle/phi/kernels/funcs/pooling.h index 1d1eacd0d5098d44cc74e5d1182ca37c86d21fdc..17b87a0e17d5127bb8d125cf489f3efdfbfb00cc 100644 --- a/paddle/phi/kernels/funcs/pooling.h +++ b/paddle/phi/kernels/funcs/pooling.h @@ -18,10 +18,10 @@ limitations under the License. */ #include #include -#include "paddle/fluid/platform/macros.h" // import FLT_MAX #include "paddle/phi/common/amp_type_traits.h" #include "paddle/phi/core/dense_tensor.h" #include "paddle/phi/core/hostdevice.h" +#include "paddle/phi/core/macros.h" // import FLT_MAX #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #include "paddle/phi/backends/gpu/gpu_decls.h"