 ///////////////////////////////////////////////////////////
 
 __device__
-void complexGEMV (const int m, const int n, const cuDoubleComplex alpha, const cuDoubleComplex* A,
+void complexGEMV (const int m, const int n, const int lda, const cuDoubleComplex alpha, const cuDoubleComplex* A,
                                     const cuDoubleComplex* arrX, cuDoubleComplex* arrY) {
     
     // first: y = beta*y

        
        // compute current column of inv(A)
        if (j < n - 1)
            complexGEMV (n, n - j, make_cuDoubleComplex(-1.0, 0.0), &A[GRID_DIM * (LDA * (j + 1))], &work[GRID_DIM * (j + 1)], &A[GRID_DIM * (LDA * j)]);
        
    }
    

            cuDoubleComplex temp = cuCmul(alpha, arrX[INDEX(j)]);
            for (int i = 0; i < m; ++i) {
                //arrY[i] += temp * A[i + (m * j)];
                arrY[INDEX(i)] = cuCfma(temp, A[INDEX(i + (lda * j))], arrY[INDEX(i)]);
            }
        }
    }
