torch/torch7 — pull request #49 by timharley (2014-06-23 20:42:10+00:00)
Title: Make the THGenerator next field an offset.

@soumith

It wasn't actually that hard to make the next field a relative offset vs a pointer and feels *much* cleaner.

To test I diff'd the stdout from this before and after this patch - no change.

>th -e "torch.manualSeed(1) ; print(torch.rand(1000000)) ; print(torch.randn(1000000))"

There is no discernible difference in speed at this level, I would need to do more involved testing to be sure it doesn't cause any problems. I'll run it through the tests from this pull request tomorrow:
https://github.com/torch/torch7/pull/13