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:
authorRonan Collobert <ronan@collobert.com>2014-04-07 16:34:55 +0400
committerRonan Collobert <ronan@collobert.com>2014-04-07 16:34:55 +0400
commitc1fd66ff1f8a5bfb0df7ce4b252c47c321370f0c (patch)
treea306f4608d424f2d0feb18c91fdc0bd63eb22797 /generic
parent555ab43e76f4be7bfaf9848af5725eeb17041cf1 (diff)
added option to mmap storage
Diffstat (limited to 'generic')
-rw-r--r--generic/Storage.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/generic/Storage.c b/generic/Storage.c
index dc0678e..66ff742 100644
--- a/generic/Storage.c
+++ b/generic/Storage.c
@@ -9,7 +9,8 @@ static int torch_Storage_(new)(lua_State *L)
{
const char *fileName = luaL_checkstring(L, 1);
int isShared = luaT_optboolean(L, 2, 0);
- storage = THStorage_(newWithMapping)(fileName, isShared);
+ long size = luaL_optlong(L, 3, 0);
+ storage = THStorage_(newWithMapping)(fileName, size, isShared);
}
else if(lua_type(L, 1) == LUA_TTABLE)
{