 
 	dim3 dimBlockA(1, 1);
 	dim3 dimGridA(state.cols / dimBlockA.x, MatrixAp.rows / dimBlockA.y);
-
+#else
+	Matrix tmp_state;
+#endif
 
 	for(i = 0; i < samples;) {
-#if MODE == 0
-		/*
-	       	 * CPU IMPLEMENTATION
-		 */
-		output_chunk = m_multiply(MatrixCA,state);
-
-		for(j = 0; j < blocksize; j++) {
-			output[i+j] = m_get(output_chunk,j,0)/128;
-		}
-		tmp_state = m_multiplyblockdiag(MatrixAp,state,2);
-		m_free(state);
-		state = tmp_state;
-
-#else
+#if MODE == 1
 		/*
 	       	 * CUDA IMPLEMENTATION
 		 */

		device_tmp_state = device_state1;
		device_state1 = device_state2;
		device_state2 = device_tmp_state;
#endif

		i = i + blocksize;

	m_print(state);
#endif

#if MODE == 1
	cudaSetDevice(0);

	CUDA_SAFE_CALL(cudaMalloc((void**) &device_MatrixAp.elements, m_size(MatrixAp)));
	CUDA_SAFE_CALL(cudaMemcpy(device_MatrixAp.elements, MatrixAp.elements, m_size(MatrixAp), cudaMemcpyHostToDevice));

