 
 #define MIN(a,b) ((a<b)?a:b)
 #define MAX(a,b) ((a>b)?a:b)
+
+#define DEBUG 1
 
 typedef struct WORDVECS{
     float* w;

        d_output.b_size = batch_size;
        long* d_olens;
        cudaMalloc((void **) &(d_olens), sizeof(long)*batch_size);
        printf("Done allocating d_olens \n");
        
        err = cudaGetLastError();
        if (err != cudaSuccess)
            printf("***ERROR***: %s\n", cudaGetErrorString(err));
        
        cudaMemcpy(d_olens, outputs[batch].lens, sizeof(long)*batch_size, cudaMemcpyHostToDevice);
        printf("Done transfering wordvecs[batch].lens -> d_olens \n");
        d_output.lens = d_olens;
        
        err = cudaGetLastError();

        err = cudaGetLastError();
        if (err != cudaSuccess)
            printf("***ERROR***: %s\n", cudaGetErrorString(err));
        if (DEBUG) {
            printf("Done launching the kernel. \n");
        }
        
        // Get output results back
        cudaMemcpy(outputs[batch].out, d_out, sizeof(float)*kerns.num*outputs[batch].lens[batch_size-1], cudaMemcpyDeviceToHost);
        if (DEBUG) {
            printf("Done transfering d_out -> outputs[batch].out \n");
        }
        
        err = cudaGetLastError();
        if (err != cudaSuccess)
            printf("***ERROR***: %s\n", cudaGetErrorString(err));
        
        // Verify GPU Results
        if (DEBUG) {
            if (batch == test_batch) {
                printf("GPU Output: \n");
                if (test_idx == 0) {
                    print_mat(&(outputs[test_batch].out[0*kerns.num]), outputs[test_batch].lens[test_idx], kerns.num);
                } else {
                    print_mat(&(outputs[test_batch].out[outputs[test_batch].lens[test_idx-1]*kerns.num]), outputs[test_batch].lens[test_idx]-outputs[test_batch].lens[test_idx-1], kerns.num);
                }
            }
        }
        
