 #pragma unroll
     for (j = 0; j < WLEN; j++) {
 #pragma unroll
-      for (k = 0; k <= SHIFT; k++) {
-        prods[j][SHIFT+k] = 0;
-        prods[j][SHIFT-k] = 0;
+      for (k = 0; k <= 2*SHIFT; k++) {
+        prods[j][k] = 0;
       }
     }
     for (i = tid; i < nrows; i += dxy) {

  float bb[WLEN + SHIFT];
  float prods[WLEN][window];
  int word[WLEN + SHIFT];
  __shared__ float CC[WLEN*BYDIM][window];
  int i, j, k, icol, jcol, ic, ir;
  int tid = threadIdx.x + blockDim.x * threadIdx.y;
  int dxy = blockDim.x * blockDim.y;


#pragma unroll
        for (k = 0; k <= SHIFT; k++) {
          prods[j][SHIFT+k] += aa[j] * bb[j+k];
        }
#pragma unroll
        for (k = 1; k <= SHIFT; k++) {
          prods[j][SHIFT-k] += aa[j+k] * bb[j];
        }
      }
