| 146 | } |
| 147 | |
| 148 | uintptr_t _mi_random_next(mi_random_ctx_t* ctx) { |
| 149 | mi_assert_internal(mi_random_is_initialized(ctx)); |
| 150 | #if MI_INTPTR_SIZE <= 4 |
| 151 | return chacha_next32(ctx); |
| 152 | #elif MI_INTPTR_SIZE == 8 |
| 153 | return (((uintptr_t)chacha_next32(ctx) << 32) | chacha_next32(ctx)); |
| 154 | #else |
| 155 | # error "define mi_random_next for this platform" |
| 156 | #endif |
| 157 | } |
| 158 | |
| 159 | |
| 160 | /* ---------------------------------------------------------------------------- |
no test coverage detected