util/rand_xor: make it clear that {,s_}rand_xorshift128plus take *exactly 2* uint64_t
authorEric Engestrom <eric.engestrom@intel.com>
Sun, 13 Oct 2019 07:52:59 +0000 (08:52 +0100)
committerMarge Bot <eric+marge@anholt.net>
Sat, 16 May 2020 12:05:37 +0000 (12:05 +0000)
Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/2316>

src/util/rand_xor.c
src/util/rand_xor.h

index 31612d576602e5361c67c51f1f90577a17c21ed0..b34b4e40bfa5233badb8a0b5d78d7dc279294081 100644 (file)
@@ -41,7 +41,7 @@
  * to the public domain.
  */
 uint64_t
-rand_xorshift128plus(uint64_t *seed)
+rand_xorshift128plus(uint64_t seed[2])
 {
    uint64_t *s = seed;
 
@@ -55,7 +55,7 @@ rand_xorshift128plus(uint64_t *seed)
 }
 
 void
-s_rand_xorshift128plus(uint64_t *seed, bool randomised_seed)
+s_rand_xorshift128plus(uint64_t seed[2], bool randomised_seed)
 {
    if (!randomised_seed)
       goto fixed_seed;
index 532d549bcda0e9cbff911feedd6e188c02ebb47d..b55598f228a57e4f5b447be435ee9f99f35df94b 100644 (file)
@@ -29,9 +29,9 @@
 #include <stdbool.h>
 
 uint64_t
-rand_xorshift128plus(uint64_t *seed);
+rand_xorshift128plus(uint64_t seed[2]);
 
 void
-s_rand_xorshift128plus(uint64_t *seed, bool randomised_seed);
+s_rand_xorshift128plus(uint64_t seed[2], bool randomised_seed);
 
 #endif /* RAND_XOR_H */