Skip to content

Commit d9e2ac6

Browse files
committed
fix compilation error on Windows, test=develop
1 parent 9b2fedc commit d9e2ac6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

paddle/fluid/operators/eigen/eigen_function.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414
#pragma once
15+
#ifndef _USE_MATH_DEFINES
16+
#define _USE_MATH_DEFINES
17+
#endif
18+
#ifndef NOMINMAX
19+
#define NOMINMAX
20+
#endif
1521
#include "unsupported/Eigen/CXX11/Tensor"
1622

1723
namespace paddle {

paddle/fluid/operators/eigen/erf.cc

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
#ifndef _USE_MATH_DEFINES
15-
#define _USE_MATH_DEFINES
16-
#endif
17-
#ifndef NOMINMAX
18-
#define NOMINMAX
19-
#endif
2014
#include "paddle/fluid/operators/eigen/eigen_function.h"
2115
#include "paddle/fluid/platform/eigen_ext.h"
2216
#include "paddle/fluid/platform/float16.h"

0 commit comments

Comments
 (0)