Files
pytorch/torch/csrc/Stream.h
Nikita Shulga 6a39613f35 [BE] Make torch/csrc/jit/tensorexpr/ clang-tidy clean (#55628)
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
2021-04-08 19:44:14 -07:00

20 lines
444 B
C

#ifndef THP_STREAM_INC
#define THP_STREAM_INC
#include <torch/csrc/python_headers.h>
struct THPStream {
PyObject_HEAD
uint64_t cdata;
};
// NOLINTNEXTLINE(cppcoreguidelines-avoid-non-const-global-variables)
extern PyTypeObject *THPStreamClass;
void THPStream_init(PyObject *module);
inline bool THPStream_Check(PyObject* obj) {
return THPStreamClass && PyObject_IsInstance(obj, (PyObject*)THPStreamClass);
}
#endif // THP_STREAM_INC