Lines Matching +full:c +full:- +full:states

9  *   https://github.com/imneme/pcg-c
11 * -----------------------------------------------------------------------------
15 * Copyright (c) 2014-2017 Melissa O'Neill and PCG Project contributors
16 * Copyright (c) 2018-2024 Gavin D. Howard and contributors.
72 // If longs are 64 bits, we have the option of 128-bit integers on some
106 * @return The product of the PCG states.
114 * @return The sum of the PCG states.
119 * Multiply two PCG states.
122 * @return The product of the PCG states.
127 * Add two PCG states.
130 * @return The sum of the PCG states.
140 #define BC_RAND_NOTMODIFIED(r) (((r)->inc & 1UL) == 0)
147 #define BC_RAND_ZERO(r) (!(r)->state)
195 * @return The product of the PCG states.
203 * @return The sum of the PCG states.
208 * Multiply two PCG states.
211 * @return The product of the PCG states.
216 * Add two PCG states.
219 * @return The sum of the PCG states.
229 #define BC_RAND_NOTMODIFIED(r) (((r)->inc.lo & 1) == 0)
236 #define BC_RAND_ZERO(r) (!(r)->state.lo && !(r)->state.hi)
263 * @return The semi-rotated state.
267 /// A 64-bit integer with the bottom 32 bits set.
271 * Returns the 32-bit truncated value of @a n.
299 // If we are using 32-bit longs, we need to set these so.
316 * @return The product of the PCG states.
324 * @return The sum of the PCG states.
329 * Multiply two PCG states.
332 * @return The product of the PCG states.
337 * Add two PCG states.
340 * @return The sum of the PCG states.
350 #define BC_RAND_NOTMODIFIED(r) (((r)->inc & 1UL) == 0)
357 #define BC_RAND_ZERO(r) (!(r)->state)
386 * @return The semi-rotated state.
406 ((BcRand) (((v) >> (r)) | ((v) << ((0 - (r)) & BC_RAND_ROTC))))
419 #define BC_RAND_SRAND_BITS ((1 << CHAR_BIT) - 1)