diff options
author | jokeren <robinho364@gmail.com> | 2017-02-22 04:50:58 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2017-02-23 14:01:13 +0300 |
commit | c29a6e097706fcd22f0ac24c93eb3c9429785e21 (patch) | |
tree | 2b2449dc311e44850591ace08d679bfaf2cd0a7f | |
parent | c1dda74ac5ac3787481eb8729ef973c6299b3609 (diff) |
Fix THFree in THTensorApply
-rw-r--r-- | lib/TH/THTensorApply.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/TH/THTensorApply.h b/lib/TH/THTensorApply.h index 490f871..d069e0d 100644 --- a/lib/TH/THTensorApply.h +++ b/lib/TH/THTensorApply.h @@ -272,11 +272,11 @@ TENSOR3##_i = 0; \ } \ } \ - if(TH_TENSOR1_contiguous) \ + if(!TH_TENSOR1_contiguous) \ THFree(TENSOR1##_counter); \ - if(TH_TENSOR2_contiguous) \ + if(!TH_TENSOR2_contiguous) \ THFree(TENSOR2##_counter); \ - if(TH_TENSOR3_contiguous) \ + if(!TH_TENSOR3_contiguous) \ THFree(TENSOR3##_counter); \ } |