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:
authorSoumith Chintala <soumith@gmail.com>2015-10-04 06:05:09 +0300
committerSoumith Chintala <soumith@gmail.com>2015-10-04 06:05:09 +0300
commit32546816754829565a2677de505e8332aa26f237 (patch)
tree919ec2eb5ab8205c9f4f26ea1d371dc73fdeabe9
parent746cfa01eaf752e0cd0ff8b806933c81fcc7d014 (diff)
hard error on unresizable storages being resizedstorageunresize
-rw-r--r--lib/TH/generic/THStorage.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/TH/generic/THStorage.c b/lib/TH/generic/THStorage.c
index b04e98d..84298f5 100644
--- a/lib/TH/generic/THStorage.c
+++ b/lib/TH/generic/THStorage.c
@@ -155,6 +155,8 @@ void THStorage_(resize)(THStorage *storage, long size)
storage->data,
sizeof(real)*size);
storage->size = size;
+ } else {
+ THError("Trying to resize storage that is not resizable");
}
}