andresy/torch — pull request #94 by rosejn (2012-12-10 15:17:04+00:00)
Title: Added an optional force option to writeObject.

I'm streaming a live recorded dataset to disk, where each sample is a table
with a number of properties (e.g. GPS coords, compass heading, and a tensor with
the current frame of video), and the built-in writeObject caching requires a deep copy of
every sample in order to work correctly, because I write each successive frame into the same tensor.

With this patch you can force writeObject to disregard caching and always write
the given object.

f:writeObject(sample, true)

If there were javadoc style comments, I would add to the comment string as well...