 	if (i < NROWS_TOT) {
 		double sem_val = eval_arrays(sym, set, tree, 0, i);
 		out_sem_tot[i] = sem_val;
-		/*
-		if (i < NROWS_TRAIN)
-			out_sem_train[i] = sem_val;
-		else
-			out_sem_test[i-NROWS_TRAIN] = sem_val;
-		*/
-	}
-}
-
-
-extern "C" __global__
-void test_kernel(double *out_sem_train, double *out_sem_test) {
-	int tig = blockIdx.x * blockDim.x + threadIdx.x;
-	if (tig < NROWS_TOT) {
-		if (tig < NROWS_TRAIN)
-			out_sem_train[tig] = tig;
-		else
-			out_sem_test[tig-NROWS_TRAIN] = tig;
 	}
 }
 

	if (id >= NUM_FUNCTIONAL_SYMBOLS && id < NUM_FUNCTIONAL_SYMBOLS + NUM_VARIABLE_SYMBOLS) {
		return getDataset(id - NUM_FUNCTIONAL_SYMBOLS, i, set);
	}
	//if (id >= NUM_FUNCTIONAL_SYMBOLS+NUM_VARIABLE_SYMBOLS) {
	return sym[id];
	//}
}

extern "C" __global__
void reduce(double *in_data, double *out_data) {
	__shared__ double shm[NUM_THREADS];              // Shared memory where to accumulate data

	int tib = threadIdx.x;                           // ID of thread in its block
	int tig = blockIdx.x * blockDim.x + threadIdx.x; // ID of thread globally

	shm[tib] = in_data[tig]; // Copy data from global to local memory
	__syncthreads();

	if (threadIdx.x == 0) {
		for (int i = 1; i < blockDim.x; i++) {
			shm[0] += shm[i];
		}
	}
	if (threadIdx.x == 0) {
		out_data[blockIdx.x] = shm[0];
	}
}

// Evaluates array for all the rows in the dataset

		}
		out_fit_test[1] = shm[0] / double(NROWS_TEST);
	}
}

extern "C" __global__
