 
         CFirstDeriv[PADDED_STATE_COUNT* MULTIPLY_BLOCK_SIZE * by + MULTIPLY_BLOCK_SIZE * bx +
           PADDED_STATE_COUNT * ty + tx] = CFirstDerivSub;
-          
+
         CSecondDeriv[PADDED_STATE_COUNT* MULTIPLY_BLOCK_SIZE * by + MULTIPLY_BLOCK_SIZE * bx +
           PADDED_STATE_COUNT * ty + tx] = CSecondDerivSub;
     }


extern "C" {

__global__ void kernelMatrixMulADB(REAL* dMatrices,
                                   unsigned int* listC,
                                   REAL* A,

        sum1[tx] = 0.0;
        sum2[tx] = 0.0;
    }

    __syncthreads();

    for (unsigned int s = SUM_SITES_BLOCK_SIZE / 2; s > 0; s >>= 1) {
        if (tx < s) {
            sum1[tx] += sum1[tx + s];
