Define THPStorage struct only once (rather than N times) (#14802)
authorLin Huang <lhuang04@fb.com>
Wed, 5 Dec 2018 21:12:37 +0000 (13:12 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 5 Dec 2018 21:19:29 +0000 (13:19 -0800)
commit524574ab73c9c874113ae74f6806591459adbaf8
tree50ca90f93f6ed627fa8a296a2167f91be24575d2
parentca6311d90941c4797bb7b0ab5775e0f5c7866335
Define THPStorage struct only once (rather than N times) (#14802)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/14802

The definetion of THPStorage does not depend on any Real, its macro
defintion is unnecessary, refactor the code so that THPStorage is not macro
defined.

Reviewed By: ezyang

Differential Revision: D13340445

fbshipit-source-id: 343393d0a36c868b9a06eea2ad9b80f5e395e947
torch/csrc/Storage.h
torch/csrc/StorageDefs.h [new file with mode: 0644]
torch/csrc/cuda/Storage.h
torch/csrc/cuda/override_macros.h
torch/csrc/cuda/restore_macros.h
torch/csrc/cuda/undef_macros.h
torch/csrc/generic/Storage.cpp
torch/csrc/generic/Storage.h
torch/csrc/generic/utils.cpp
torch/csrc/utils.cpp