From: Kahina Date: Wed, 4 Nov 2015 13:55:51 +0000 (+0100) Subject: MAJ de algo 1 & algo 2 X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/kahina_paper1.git/commitdiff_plain/d01b38b825b4f5d811d42fc1904be2e7bd85883f?ds=inline MAJ de algo 1 & algo 2 --- diff --git a/paper.tex b/paper.tex index 34b803c..dde98e9 100644 --- a/paper.tex +++ b/paper.tex @@ -583,7 +583,7 @@ Algorithm~\ref{alg2-cuda} shows a sketch of the Ehrlich-Aberth algorithm using C \caption{CUDA Algorithm to find roots with the Ehrlich-Aberth method} \KwIn{$Z^{0}$ (Initial root's vector), $\varepsilon$ (error tolerance - threshold), P(Polynomial to solve), Pu (the derivative of P), $n$ (Polynomial's degrees),$\Delta z_{max}$ (maximum value of stop condition)} + threshold), P(Polynomial to solve), Pu (the derivative of P), $n$ (Polynomial's degrees), $\Delta z_{max}$ (maximum value of stop condition)} \KwOut {$Z$ (The solution root's vector), $ZPrec$ (the previous solution root's vector)} @@ -592,14 +592,14 @@ Algorithm~\ref{alg2-cuda} shows a sketch of the Ehrlich-Aberth algorithm using C Initialization of the of P\; Initialization of the of Pu\; Initialization of the solution vector $Z^{0}$\; -Allocate and copy initial data to the GPU global memory ($d\_Z,d\_ZPrec,d\_P,d\_Pu$)\; +Allocate and copy initial data to the GPU global memory\; k=0\; \While {$\Delta z_{max} > \epsilon$}{ Let $\Delta z_{max}=0$\; -$ kernel\_save(d\_ZPrec,d\_Z)$\; +$ kernel\_save(ZPrec,Z)$\; k=k+1\; -$ kernel\_update(d\_Z,d\_P,d\_Pu)$\; -$kernel\_testConverge(\Delta z_{max},d\_Z,d\_ZPrec)$\; +$ kernel\_update(Z,P,Pu)$\; +$kernel\_testConverge(\Delta z_{max},Z,ZPrec)$\; } Copy results from GPU memory to CPU memory\; @@ -619,10 +619,10 @@ exponential logarithm algorithm. %\LinesNumbered \caption{Kernel update} -\eIf{$(\left|d\_Z\right|<= R)$}{ -$kernel\_update((d\_Z,d\_P,d\_Pu)$\;} +\eIf{$(\left|Z\right|<= R)$}{ +$kernel\_update((Z,P,Pu)$\;} { -$kernel\_update\_ExpoLog((d\_Z,d\_P,\_Pu))$\; +$kernel\_update\_ExpoLog((Z,P,Pu))$\; } \end{algorithm}