Probably a safer way of generating the random number seed for the CPU implementation