From: Kahina Date: Thu, 5 May 2016 03:43:46 +0000 (+0200) Subject: Quelques correction X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/kahina_paper1.git/commitdiff_plain?ds=inline Quelques correction --- diff --git a/maj.tex b/maj.tex index 89dccc2..0a7b275 100644 --- a/maj.tex +++ b/maj.tex @@ -650,11 +650,11 @@ Algorithm~\ref{alg2-cuda} defines the main key points for finding roots polynomi %\item Initialization of the solution vector $Z^{0}$\; \item Initialization of the parameters of roots finding problem (P, Pu, $Z^{0}$); \item Allocate and copy initial data to the GPU global memory\; -\item k=0\; +%\item k=0\; \While {$\Delta z_{max} > \varepsilon$}{ \item Let $\Delta z_{max}=0$\; \item $ save(ZPrec,Z)$\; -\item k=k+1\; +%\item k=k+1\; \item $ Find(Z,P,Pu)$\; \item $testConverge(\Delta z_{max},Z,ZPrec)$\; @@ -748,20 +748,20 @@ kernels for the evaluation of a polynomial are not detailed.} \begin{footnotesize} \lstinputlisting[label=lst:01,caption=Kernels to update the roots]{code.c} \end{footnotesize} -\KG{}The Kernel \verb= __global__EA_update()= is a code called from the host and executed on the device, need to call \verb=__device__FirstH_EA()= on the device to compute the root who are under the unit circle ($R$), the \verb= __device__NewH_EA()= is called to compute root with the exp-log version. The Horner schema are used to evaluate the polynomial and his derivative in $Z[i]$ \verb=__device__Fonction()= and \verb=__deviceFonctionD()= respectively. Its exp-log version need to be implemented \verb= __device__LogFonction()=, \verb= __device__LogFonctionD()= +\KG{}The Kernel \verb= __global__EA_update()= is a code called from the host and executed on the device, need to call \verb=__device__FirstH_EA()= on the device to compute the root who are under the unit circle ($R$), the \verb= __device__NewH_EA()= is called to compute root with the exp-log version. The Horner scheme are used to evaluate the polynomial and his derivative in $Z[i]$ \verb=__device__Fonction()= and \verb=__device__FonctionD()= respectively. Its exp-log version need to be implemented \verb= __device__LogFonction()=, \verb= __device__LogFonctionD()= and used in the exp-log version of the Ehrlich-Aberth method \begin{itemize} -\item \verb= __device__LogFonction()= to -\item \verb= __device__LogFonctionD()= for the +\item \verb= __device__LogFonction()= to evaluate the polynomial $P$ when the modulus of Z[i] is upper to circle unit $R$. +\item \verb= __device__LogFonctionD()=to evaluate the derivative of the polynomial $P$ when the modulus of Z[i] is upper to circle unit $R$. \end{itemize} %need to call some function on device %The Kernel \verb= EA_update= is a code implemented to executed on GPU and lanced in CPU, This kernel is executed by a large number of GPU threads such that each thread is in charge of the computation of one component of the iterate vector $Z$. We set the size of a thread block, \textit{Threads}, to 512 threads and the number of thread blocks of a kernel, \textit{Blocks}, is computed so as each GPU thread is in charge of one vector element: -\[ Blocks=\frac{N+Threads-1}{Threads}, N: Polynomial size \] +\[ 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 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: +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 in the same iteration, like the following scheme: \begin{figure}[htbp] \centering