zdevito/pytorch

Tensor -> Tensor/TensorImpl

zdevito opened this issue · 1 comments

Right now tensors are returned by pointer and passed by reference. Instead tensors should be passed around by value and internally use TH* ref counting mechanisms to know when to delete. The statically-dispatched methods which are now on Tensor will remain there, others will need to forward to a TensorImpl class that will hold the actual pointer.

101fc259 finished this.