     }
 }
 
-__device__ long rk_poisson(rk_state *state, double lam) {
+__device__ int64_t rk_poisson(rk_state *state, double lam) {
     if (lam >= 10) {
         return rk_poisson_ptrs(state, lam);
     } else if (lam == 0) {

    }
}

__device__ long rk_poisson_ptrs(rk_state *state, double lam) {
    long k;
    double U, V, slam, loglam, a, b, invalpha, vr, us;
    slam = sqrt(lam);
    loglam = log(lam);

    }
}

__device__ int64_t rk_poisson_mult(rk_state *state, double lam) {
    int64_t X;
    double prod, U, enlam;
    enlam = exp(-lam);
    X = 0;
