From 624de00de6f70404c50de40106e10c85db0bf140 Mon Sep 17 00:00:00 2001 From: ztaylor Date: Tue, 26 May 2015 11:51:19 -0700 Subject: [PATCH] Removing the chained views check, as its not needed. --- generic/Storage.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/generic/Storage.c b/generic/Storage.c index 61c4c2fa..98fad343 100644 --- a/generic/Storage.c +++ b/generic/Storage.c @@ -45,10 +45,6 @@ static int torch_Storage_(new)(lua_State *L) THError("Passing allocator not supported when using storage views"); THStorage *src = luaT_checkudata(L, index, torch_Storage); - if (src->flag & TH_STORAGE_VIEW) { - // don't allow chained views - src = src->view; - } real *ptr = src->data; long offset = luaL_optlong(L, index + 1, 1) - 1; if (offset < 0 || offset >= src->size) {