Lines Matching refs:count
45 void i915_prandom_shuffle(void *arr, size_t elsz, size_t count,
50 if (WARN_ON(elsz > sizeof(stack) || count > U32_MAX))
53 if (!elsz || !count)
57 while (--count) {
60 swp = i915_prandom_u32_max_state(count + 1, state);
61 if (swp == count)
64 memcpy(stack, arr + count * elsz, elsz);
65 memcpy(arr + count * elsz, arr + swp * elsz, elsz);
70 void i915_random_reorder(unsigned int *order, unsigned int count,
73 i915_prandom_shuffle(order, sizeof(*order), count, state);
76 unsigned int *i915_random_order(unsigned int count, struct rnd_state *state)
80 order = kmalloc_array(count, sizeof(*order),
85 for (i = 0; i < count; i++)
88 i915_random_reorder(order, count, state);