 #include "nscheme.h"
 
 
-__device__ int d_convergence;
-
 // Kernel responsável por uma iteração.
-__global__ void kernel_iter(const int nn, const int k, const float alpha, float R, elementri *elements, node *nodes, float *V) {
+__global__ void kernel_iter(const int nn, const int k, const float alpha, float R, elementri *elements, node *nodes, float *V, int *conv) {
     int i = blockIdx.x * blockDim.x + threadIdx.x;
     if (i >= nn) return;
 

// device e invocar todas os kernels necessários.
extern "C" int run(const int ne, const int nn, const float alpha, const float Rf, const float T, elementri *elements, node *nodes, float *V, bool verbose, float *bench) {
    clock_t t;
    int k = 1, convergence;
    float *d_V;
    float R;
    node *d_nodes;

    cudaFree(d_V);
    cudaFree(d_nodes);
    cudaFree(d_elements);
    cudaFree(d_conv);

    return k;
}
