Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/torch7.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harley <tim.harley.uk@gmail.com>2014-02-26 16:11:00 +0400
committerTim Harley <tim.harley.uk@gmail.com>2014-02-28 19:23:42 +0400
commit6508505cac37fac259e21b591a8a07aa15da3e2c (patch)
tree6932b074eaf907be1a009748e3a9303482e0655f /random.lua
parent4b985215c6a40f13699094d96851209d24667fd4 (diff)
Create a generator in the lua torch scope.
Diffstat (limited to 'random.lua')
-rw-r--r--random.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/random.lua b/random.lua
index 5f66430..8b96be5 100644
--- a/random.lua
+++ b/random.lua
@@ -41,6 +41,8 @@ interface:print(
void torch_random_init(lua_State *L)
{
torch_Generator_init(L);
+ torch_Generator_new(L);
+ lua_setfield(L, -2, "_gen");
luaL_register(L, NULL, random__);
}
]])