mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary:
Mostly auto-generated changes using
```
python3 tools/clang_tidy.py -c build -x torch/csrc/jit/tensorexpr/eval.cpp -s
```
With following common patterns manually fixed
- Use ` = default` instead of `{}`
- deleted methods should be public
- Use pass-by-value + std::move instead of pass-by-reference+copy
Pull Request resolved: https://github.com/pytorch/pytorch/pull/55628
Reviewed By: walterddr
Differential Revision: D27655378
Pulled By: malfet
fbshipit-source-id: 92be87a08113435d820711103ea9b0364182c71a
20 lines
551 B
C
20 lines
551 B
C
#pragma once
|
|
// NOLINTNEXTLINE(modernize-deprecated-headers)
|
|
#include <math.h>
|
|
// workaround for Python 2 issue: https://bugs.python.org/issue17120
|
|
// NOTE: It looks like this affects Python 3 as well.
|
|
#pragma push_macro("_XOPEN_SOURCE")
|
|
#pragma push_macro("_POSIX_C_SOURCE")
|
|
#undef _XOPEN_SOURCE
|
|
#undef _POSIX_C_SOURCE
|
|
|
|
#include <Python.h>
|
|
#include <structseq.h>
|
|
|
|
#pragma pop_macro("_XOPEN_SOURCE")
|
|
#pragma pop_macro("_POSIX_C_SOURCE")
|
|
|
|
#if PY_MAJOR_VERSION < 3
|
|
#error "Python 2 has reached end-of-life and is no longer supported by PyTorch."
|
|
#endif
|