Skip to content

Commit

Permalink
Removing the chained views check, as its not needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
zakattacktwitter committed May 26, 2015
1 parent e75f09c commit 624de00
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions generic/Storage.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 624de00

Please sign in to comment.