Resize the storage to the provide size
. If keepContent
is true
, then the contents
of the storage are kept. If not, the new contents are undertermined.
This function returns self, allowing things like:
x = torch.DoubleStorage(10):fill(1) y = torch.DoubleStorage():resize(x:size()):copy(x) -- y won't be nil!