 
 	dim3 dimBlockA(1, 1);
 	dim3 dimGridA(state.cols / dimBlockA.x, MatrixAp.rows / dimBlockA.y);
+
+	MatrixMultiplyKernel<<<dimGridCA, dimBlockCA, 1, streams[0]>>>(device_MatrixCA, device_state_read, device_output_chunk_write);
+	MatrixMultiplyKernel<<<dimGridA, dimBlockA, 1, streams[1]>>>(device_MatrixAp, device_state_read, device_state_write);
 #else
 	Matrix state_tmp;
 #endif

#endif

	MatrixCA = m_new(blocksize, MatrixA.cols);
	output_chunk = m_new(blocksize,1);
	MatrixAp = m_new(MatrixA.rows, MatrixA.cols); // BLOCKDIAGMATRIX
	m_identity(MatrixAp);


	blocksize = 100;

#if MODE == 1
	Matrix device_MatrixAp;
	Matrix device_MatrixCA;
	Matrix device_state_read, device_state_write, device_state_tmp;
	Matrix device_output_chunk_read, device_output_chunk_write, device_output_chunk_tmp;

	device_MatrixCA = m_new(blocksize, MatrixA.cols);
	device_output_chunk_read = m_new(blocksize,1);
