src/base.lisp @ d74fa73a0e76

My server only has one core
author Steve Losh <steve@stevelosh.com>
date Tue, 06 Feb 2018 19:05:23 -0500
parents ba8de6322022
children eefee58dd493
(in-package :flax.base)

(setf lparallel:*kernel* (lparallel:make-kernel 1))

(defun rand (bound)
  (pcg:pcg-random t bound))

(defmacro with-seed (seed &body body)
  `(let ((pcg::*global-generator* (pcg:make-pcg :seed ,seed))) ,@body))