]> AND Private Git Repository - kahina_paper1.git/commitdiff
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Kernel testConvergence code
authorKahina <kahina@kahina-VPCEH3K1E.(none)>
Mon, 2 May 2016 06:49:59 +0000 (08:49 +0200)
committerKahina <kahina@kahina-VPCEH3K1E.(none)>
Mon, 2 May 2016 06:49:59 +0000 (08:49 +0200)
code1.c [new file with mode: 0644]

diff --git a/code1.c b/code1.c
new file mode 100644 (file)
index 0000000..7291044
--- /dev/null
+++ b/code1.c
@@ -0,0 +1,11 @@
+//kernel to test the convergence of roots
+__global__
+void TestConvergence_kernel(int size,cuDoubleComplex *Z,
+cuDoubleComplex *ZPrec,double *Error)
+{ int i= blockIdx.x*blockDim.x+ threadIdx.x;
+
+if(i<size) {
+   d_Error[i]=cuCmodule(cuCdiv(cuCsub(d_Z[i],d_ZPrec[i]), d_Z[i]));
+
+       }
+}