Lines Matching full:ceil
191 * u32 get_random_u32_below(u32 ceil)
193 * u32 get_random_u32_inclusive(u32 floor, u32 ceil)
556 u32 __get_random_u32_below(u32 ceil)
559 * This is the slow path for variable ceil. It is still fast, most of
561 * opportunistically comparing the lower half to ceil itself, before
563 * whose lower half would indicate a range indivisible by ceil. The use
564 * of `-ceil % ceil` is analogous to `2^32 % ceil`, but is computable
571 * This function is technically undefined for ceil == 0, and in fact
578 if (unlikely(!ceil))
581 mult = (u64)ceil * rand;
582 if (unlikely((u32)mult < ceil)) {
583 u32 bound = -ceil % ceil;
585 mult = (u64)ceil * get_random_u32();