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:
Diffstat (limited to 'lib/THC/THCTensorMathReduce.cuh')
-rw-r--r--lib/THC/THCTensorMathReduce.cuh6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/THC/THCTensorMathReduce.cuh b/lib/THC/THCTensorMathReduce.cuh
index 026e2c6..5051fbe 100644
--- a/lib/THC/THCTensorMathReduce.cuh
+++ b/lib/THC/THCTensorMathReduce.cuh
@@ -469,8 +469,8 @@ kernelTransformReduceOuterDimIndex(K *tgt1,
for (unsigned col = 0; col < row_size; ++col) {
// +1 for Lua index
- acc = binary_op(thrust::make_pair<K, Index>(*src, col + TH_INDEX_BASE),
- acc);
+ acc = binary_op(acc,
+ thrust::make_pair<K, Index>(*src, col + TH_INDEX_BASE));
src += num_irows;
}
@@ -550,7 +550,7 @@ kernelTransformReduceInnermostDimIndex(K *tgt1,
K *src = src_ + row * row_size;
// Sequential reduction within a thread.
for (unsigned col = threadIdx.x; col < row_size; col += blockDim.x) {
- acc = binary_op(thrust::make_pair<K, Index>(src[col], col + TH_INDEX_BASE), acc);
+ acc = binary_op(acc, thrust::make_pair<K, Index>(src[col], col + TH_INDEX_BASE));
}
}