    }
 }
 
-//32x32
-#define NTHREADS_X 32
-#define NTHREADS_Y 32
-#define THREADS_PER_BLOCK NTHREADS_X * NTHREADS_Y
-
 __global__ void matrix_mul(int *a, int *b, int *c, int a_ncolumns, int c_nlines,
-        int c_ncolumns, int nBlocks) {
+        int c_ncolumns, int nBlocks)
+{
     int i, z, sum = 0;
     int nMultiplications = a_ncolumns;
     int multiplicationsInBlock = NTHREADS_Y;

    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);

    }

    gettimeofday(&timevalA,NULL);

    gpuErrchk( cudaMemcpy(d_a, a, a_size, cudaMemcpyHostToDevice) );
    gpuErrchk( cudaMemcpy(d_b, b, b_size, cudaMemcpyHostToDevice) );

    dim3 tbloco = dim3(
                    (int) std::ceil( (double) c_ncolumns / NTHREADS_X ),
                    (int) std::ceil( (double) c_nlines / NTHREADS_Y ),
                    1
                );

