  #include <stdlib.h>
  #include <time.h>
  #include <sys/time.h>
+
+ //32x32
+ #define NTHREADS_X 32
+ #define NTHREADS_Y 32
+ #define THREADS_PER_BLOCK NTHREADS_X * NTHREADS_Y
 
 // Credit to: http://stackoverflow.com/a/14038590 for the gpuErrchk macro.
 #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }

    b_size = b_nlines * b_ncolumns * sizeof(int);
    c_size = c_nlines * c_ncolumns * sizeof(int);

    cudaMalloc((void **) &d_a, a_size);
    cudaMalloc((void **) &d_b, b_size);
    cudaMalloc((void **) &d_c, c_size);

    a = (int *)malloc(a_size);
    b = (int *)malloc(b_size);


    for (z = 0; z < nBlocks; z++) {

        // Load Matrix A
        a_tLine = (blockIdx.y * NTHREADS_Y + threadIdx.y);
        a_tColumn = (z * NTHREADS_X + threadIdx.x);
        if (a_tLine < c_nlines && a_tColumn < a_ncolumns) {
            s_a[threadIdx.y][threadIdx.x] = a[ (a_ncolumns * a_tLine) + a_tColumn];
        }

        // Load Matrix B
        b_tLine = (z * NTHREADS_Y + threadIdx.y);
        b_tColumn = (blockIdx.x * NTHREADS_X + threadIdx.x);
        if (b_tLine < a_ncolumns && b_tColumn < c_ncolumns) {
            s_b[threadIdx.y][threadIdx.x] = b[ (c_ncolumns * b_tLine) + b_tColumn ];
        }

        __syncthreads();

        /* Checkin to see if that thread actually belongs to a valid position in
         * the Matrix C
         */
        if (column < c_ncolumns && line < c_nlines) {
            if (nMultiplications < NTHREADS_Y) {
                multiplicationsInBlock = nMultiplications;
            }

            for (i = 0; i < multiplicationsInBlock; i++) {
