I needed a way to store the curand state between random() calls. It's optional; the behavior of the existing API is unchanged. It's here if you're interested: https://github.com/karboski/MatX/tree/randomstate