//kernels to update a root i
__global__
-void Dev_EA(int i, cuDoubleComplex *Z, int size) {
+void Dev_EA(int i, cuDoubleComplex *Z, int* finished,
+ int size) {
int i= blockIdx.x*blockDim.x+ threadIdx.x;
if(i<size) {
//if the root needs to be updated