Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/cutorch.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsoumith <soumith@fb.com>2016-11-02 07:08:35 +0300
committersoumith <soumith@fb.com>2016-11-02 07:08:52 +0300
commit45a229db8bcb823217f0c64547418bc58507e91d (patch)
tree1d5d0e9875dc0fbd759443bb177405a05c767e78
parent1b2cae6730d3af8b20365e712144e04bdc48b9b2 (diff)
TH_INDEX_BASE for nonzero
-rw-r--r--lib/THC/THCTensorMath.cu2
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;
}
};