pytorch/torch/csrc/Storage.h
Kurt Mohler 14d0296e5c Rename _Typed/_UntypedStorage to Typed/UntypedStorage and update docs (#82438)
### Description

Since the major changes for `_TypedStorage` and `_UntypedStorage` are now complete, they can be renamed to be public.

`TypedStorage._untyped()` is renamed to `TypedStorage.untyped()`.

Documentation for storages is improved as well.

### Issue
Fixes #82436

### Testing
N/A

Pull Request resolved: https://github.com/pytorch/pytorch/pull/82438
Approved by: https://github.com/ezyang
2022-07-30 19:37:08 +00:00

23 lines
485 B
C

#ifndef THP_STORAGE_INC
#define THP_STORAGE_INC
#include <torch/csrc/Types.h>
#define THPStorageStr "torch.UntypedStorage"
#define THPStorageBaseStr "StorageBase"
struct THPStorage {
PyObject_HEAD c10::StorageImpl* cdata;
};
TORCH_PYTHON_API PyObject* THPStorage_New(
c10::intrusive_ptr<c10::StorageImpl> ptr);
extern PyObject* THPStorageClass;
bool THPStorage_init(PyObject* module);
void THPStorage_postInit(PyObject* module);
extern PyTypeObject THPStorageType;
#endif