pytorch/c10/util/MathConstants.cpp
Nikita Shulga 087049000b Make c10 clang-tidy clean (#55870)
Summary:
This change was autogenerated by running:
```
% find c10 -iname "*.cpp" -exec python3 tools/clang_tidy.py -c build -x {} -s \;
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/55870

Reviewed By: janeyx99

Differential Revision: D27728617

Pulled By: malfet

fbshipit-source-id: bede4d7f0c106d51394d1e9efddf01bf894421c5
2021-04-14 11:23:28 -07:00

14 lines
322 B
C++

// define constants like M_PI and C keywords for MSVC
#ifdef _MSC_VER
#ifndef _USE_MATH_DEFINES
#define _USE_MATH_DEFINES
#endif
#endif
#include <c10/util/MathConstants.h>
// NOLINTNEXTLINE(modernize-deprecated-headers)
#include <math.h>
static_assert(M_PI == c10::pi<double>, "c10::pi<double> must be equal to M_PI");