\end{itemize}
-\KG{Listing ~\ref{lst:01} shows the main kernel of the iterative function
-shows the a simplified version of second kernel
+\KG{Listing ~\ref{lst:01} shows a simplified version of second kernel
code (some parameters in the kernels have been simplified in order to
increase the readability). As can be seen this
kernel calls multiple kernels, all the kernels for complex numbers and
\[ Blocks=\frac{N+Threads-1}{Threads}, N: Polynomial size \]
%$ Blocks=\frac{N+Threads-1}{Threads}, N: Polynomial size$
-Each GPU threads in grid compute one root en parallel, if the polynomial size exceed the capacity of the grid the G.S schema are finely executed, like the grid can only compute << Blocks,Threads>> roots at the same time, if we ned to compute more roots, the grid can used the roots previously executed to compute other root ih the same iteration, like the following schema:
+Each GPU threads in grid compute one root en parallel, if the polynomial size exceed the capacity of the grid the G.S schema are finely executed, like the grid can only compute << Blocks,Threads>> roots at the same time, if we need to compute more roots, the grid can used the roots previously executed to compute other root ih the same iteration, like the following schema:
%\begin{figure}[htbp]
%\centering
%\caption{Gauss Seidel iteration}
%\label{fig:08}
-The kernel are executed from << DimGrid, DimBlock>>,
+
The last kernel checks the convergence of the roots after each update
of $Z^{k}$, according to formula Eq.~\ref{eq:Aberth-Conv-Cond}. We used the functions of the CUBLAS Library (CUDA Basic Linear Algebra Subroutines) to implement this kernel.
+This listing shows the kernel \textit{TestConvergence} code
+ \begin{footnotesize}
+\lstinputlisting[label=lst:01,caption=Kernel to test the convergence of the roots]{code1.c}
+\end{footnotesize}
The kernel terminates its computations when all the roots have
converged. It should be noticed that, as blocks of threads are