From bea3665f9dbcd2a5248078d2c23903fcc973c6be Mon Sep 17 00:00:00 2001 From: koray kavukcuoglu Date: Sun, 13 Oct 2013 20:11:41 +0100 Subject: move index declaragtion into pragma --- generic/TemporalMaxPooling.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'generic') diff --git a/generic/TemporalMaxPooling.c b/generic/TemporalMaxPooling.c index 5e269cf..3c0384d 100644 --- a/generic/TemporalMaxPooling.c +++ b/generic/TemporalMaxPooling.c @@ -18,7 +18,7 @@ static int nn_(TemporalMaxPooling_updateOutput)(lua_State *L) real *output_data; real *indices_data; - long t, x, y; + long t, y; luaL_argcheck(L, input->nDimension == 2, 2, "2D tensor expected"); luaL_argcheck(L, input->size[0] >= kW, 2, "input sequence smaller than kernel size"); @@ -53,6 +53,7 @@ static int nn_(TemporalMaxPooling_updateOutput)(lua_State *L) /* compute local max: */ long maxindex = -1; real maxval = -THInf; + long x; for(x = 0; x < kW; x++) { real val = ip[x*framesize+y]; -- cgit v1.2.3