//kernels to update a root i
__global__
-cuDoubleComplex H_EA(int i, cuDoubleComplex *Z) {
- cuDoubleComplex c;
- //if the root needs to be updated
- if(!finished[i]) {
- //according to the module of the root
- if (Cmodule(Z[i])<=maxRadius)
- //selects the normal version
- c = FirstH_EA(i,Z);
- else
- //of the Log Exp version
- c = NewH_EA(i,Z);
- return c;
+void Dev_EA(int i, cuDoubleComplex *Z, int size) {
+ int i= blockIdx.x*blockDim.x+ threadIdx.x;
+ if(i<size) {
+ //if the root needs to be updated
+ if(!finished[i]) {
+ //according to the module of the root
+ if (Cmodule(Z[i])<=maxRadius)
+ //selects the normal version
+ Z[i] = FirstH_EA(i,Z);
+ else
+ //of the Log Exp version
+ Z[i] = NewH_EA(i,Z);
+ return c;
+ }
}
- else return Z[i];
}