The LAPACK routine zgesv
first computes the LU factorization, and then solves the system making use of the factorization. It is a simple driver for calling the two routines zgetrf
(compute the LU factorization) and zgetrs
(solve the system).
The LU factorization is computed using partial pivoting and row interchanges. Then, the system is solved using simple backwards and forwards substitution.
So, the number of operations needed for zgesv
will be the sum of the operations for the two sub-calls. Appendix C of the installation guide for LAPACK by Blackford and Dongarra lists the operation counts needed for certain LAPACK routines. The operation counts are given for the real-valued, single precision versions. To obtain the operation counts for complex-valued versions, we notice that each complex addition is computed with two real additions, and each complex multiplication is computed with four real multiplications and two real additions.
From the installation guide:
\begin{align*}
\texttt{SGETRF} \qquad & \text{multiplications:}&& 1/2mn^2 - 1/6n^3+1/2mn - 1/2n^2 +2/3n \\
& \text{additions:} && 1/2mn^2 - 1/6n^3 - 1/2mn + 1/6n \\[20pt]
\texttt{SGETRS} \qquad & \text{multiplications:}&& \texttt{NRHS} [n^2] \\
& \text{additions:} && \texttt{NRHS}[n^2 - n]
\end{align*}
Converting to complex-valued operations, we obtain
\begin{align*}
\texttt{ZGETRF} \qquad & \text{multiplications:}&&
2mn^2 - 2/3n^3 + 2mn - 2n^2 + 8/3n \\
& \text{additions:} &&
2mn^2 - 2/3n^3 - n^2 + 5/3n \\[20pt]
\texttt{ZGETRS} \qquad & \text{multiplications:}&&\texttt{NRHS} [4n^2] \\
& \text{additions:} && \texttt{NRHS}[4n^2 - 2n]
\end{align*}
Adding up:
\begin{align*}
\texttt{ZGESV} \qquad & \text{total:}&& 4mn^2 - 4/3n^3 + 2mn -3n^2 +13/3n + \texttt{NRHS}[8n^2 - 2n]
\end{align*}
When the system is square ($m=n$) and there is only one right-hand side ($\texttt{NRHS}=1$), this reduces to
$$
8/3n^3 + 7n^2 + 7/3n.
$$