     }
 }
 
-__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) {

}

void poisson(int generator, intptr_t state, intptr_t out, ssize_t size, intptr_t stream, double lam) {
    kernel_launcher<poisson_functor, double> launcher(size, reinterpret_cast<cudaStream_t>(stream));
    generator_dispatcher(generator, launcher, state, out, size, lam);
}


    }
}

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