| #include <torch/csrc/Types.h> |
| #define THPStorageStr "torch.UntypedStorage" |
| c10::MaybeOwned<c10::Storage> cdata; |
| TORCH_PYTHON_API PyObject* THPStorage_Wrap(c10::Storage storage); |
| TORCH_PYTHON_API PyObject* THPStorage_NewWithStorage( |
| c10::impl::PyInterpreterStatus status, |
| bool allow_preexisting_pyobj = false); |
| extern PyTypeObject* THPStorageClass; |
| static inline bool THPStorage_CheckTypeExact(PyTypeObject* tp) { |
| return tp == THPStorageClass; |
| static inline bool THPStorage_CheckExact(PyObject* obj) { |
| return THPStorage_CheckTypeExact(Py_TYPE(obj)); |
| inline bool THPStorage_Check(PyObject* obj) { |
| const auto result = PyObject_IsInstance(obj, (PyObject*)THPStorageClass); |
| bool THPStorage_init(PyObject* module); |
| void THPStorage_postInit(PyObject* module); |
| void THPStorage_assertNotNull(THPStorage* storage); |
| void THPStorage_assertNotNull(PyObject* obj); |
| extern PyTypeObject THPStorageType; |
| inline const c10::Storage& THPStorage_Unpack(THPStorage* storage) { |
| inline const c10::Storage& THPStorage_Unpack(PyObject* obj) { |
| return THPStorage_Unpack(reinterpret_cast<THPStorage*>(obj)); |