Is qrand() guaranteed to generate the same sequence with same seed across different platforms?
General and Desktop
3
Posts
3
Posters
2.1k
Views
1
Watching
-
I need to generate pseudo random data for benchmarking purposes, so in order to have uniformity of the results across different platforms I need to be able to generate the same random data. So the big question is, will qrand() generate the same pseudo random sequences on different platforms if the seed is the same?
-
Your question must be "will srand() generate the same pseudo random sequences on different platforms if the seed is the same", because qrand realized through srand, but guarantees thread-safety. And you can easily test it by hand. I think the answer in no.
My opinion - you must use once generated sequence.
-