diff options
author | soumith <soumith@fb.com> | 2016-11-02 07:08:35 +0300 |
---|---|---|
committer | soumith <soumith@fb.com> | 2016-11-02 07:08:52 +0300 |
commit | 45a229db8bcb823217f0c64547418bc58507e91d (patch) | |
tree | 1d5d0e9875dc0fbd759443bb177405a05c767e78 | |
parent | 1b2cae6730d3af8b20365e712144e04bdc48b9b2 (diff) |
TH_INDEX_BASE for nonzero
-rw-r--r-- | lib/THC/THCTensorMath.cu | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/THC/THCTensorMath.cu b/lib/THC/THCTensorMath.cu index 190b076..1dc24c3 100644 --- a/lib/THC/THCTensorMath.cu +++ b/lib/THC/THCTensorMath.cu @@ -89,7 +89,7 @@ struct idx_functor __host__ __device__ long operator()(long val) { - return (val / div) % size + 1; + return (val / div) % size + TH_INDEX_BASE; } }; |