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

	output = (float *) malloc(sizeof(float) * samples);
	blocksize = 100;

	device_MatrixCA = m_new(blocksize, MatrixA.cols);
	device_output_chunk = m_new(blocksize,1);
	device_MatrixAp = m_new(MatrixA.rows, MatrixA.cols); // BLOCKDIAGMATRIX
	device_state1 = m_new(2 * filters, 1);
	device_state2 = m_new(2 * filters, 1);

	MatrixCA = m_new(blocksize, MatrixA.cols);
	output_chunk = m_new(blocksize,1);

	float* output;
	Matrix MatrixCA, MatrixCA_line, output_chunk;
	Matrix MatrixAp, tmp_MatrixAp;


#if DEBUG == 2
	printf("MatrixA");
