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

github.com/torch/nn.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Cosatto <cosatto@nec-labs.com>2017-07-27 16:43:56 +0300
committerSoumith Chintala <soumith@gmail.com>2017-07-27 16:43:56 +0300
commit55374c200cb01fe2b9a549200a1e055e2438fe41 (patch)
treef082410818514377a44e9390fde504dc78fd457c
parentf6134120040624e7b387b81488d0208f881a1904 (diff)
replace lon glong types with size_t (#1267)
Work around bug in msvc compiler in win32 mode
-rw-r--r--lib/THNN/generic/TemporalRowConvolution.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/THNN/generic/TemporalRowConvolution.c b/lib/THNN/generic/TemporalRowConvolution.c
index e3ae41e..4947aad 100644
--- a/lib/THNN/generic/TemporalRowConvolution.c
+++ b/lib/THNN/generic/TemporalRowConvolution.c
@@ -73,7 +73,7 @@ static void THNN_(unfolded_acc_row)(
// #pragma omp parallel for private(c)
for (c = 0; c < inputFrameSize; c++) {
size_t kw, x;
- long long ix = 0;
+ size_t ix = 0;
for (kw = 0; kw < kW; kw++) {
real *src = finput_data
@@ -81,7 +81,7 @@ static void THNN_(unfolded_acc_row)(
+ kw * (nOutputFrame);
real *dst = input_data + c * (nInputFrame);
- ix = (long long)(kw);
+ ix = (size_t)(kw);
if (dW == 1) {
real *dst_slice = dst + (size_t)(ix);
THVector_(cadd)(dst_slice, dst_slice, src, 1, nOutputFrame);
@@ -116,11 +116,11 @@ static void THNN_(unfolded_copy_row)(
size_t rest = k % kW;
size_t kw = rest % kW;
size_t x;
- long long ix;
+ size_t ix;
real *dst = finput_data + c * (kW * nOutputFrame) + kw * (nOutputFrame);
real *src = input_data + c * (nInputFrame);
- ix = (long long)(kw);
+ ix = (size_t)(kw);
if (dW == 1) {
memcpy(dst, src+(size_t)(ix), sizeof(real) * (nOutputFrame));
} else {