| 339 | |
| 340 | template<typename T> |
| 341 | void uniformDistributionMT(T *out, size_t elements, uint *const state, |
| 342 | const uint *const pos, const uint *const sh1, |
| 343 | const uint *const sh2, uint mask, |
| 344 | const uint *const recursion_table, |
| 345 | const uint *const temper_table) { |
| 346 | uint l_state[STATE_SIZE]; |
| 347 | uint o[4]; |
| 348 | uint lpos = pos[0]; |
| 349 | uint lsh1 = sh1[0]; |
| 350 | uint lsh2 = sh2[0]; |
| 351 | |
| 352 | state_read(l_state, state); |
| 353 | |
| 354 | int reset = (4 * sizeof(uint)) / sizeof(T); |
| 355 | for (int i = 0; i < (int)elements; i += reset) { |
| 356 | mersenne(o, l_state, i, lpos, lsh1, lsh2, mask, recursion_table, |
| 357 | temper_table); |
| 358 | int lim = (reset < (int)(elements - i)) ? reset : (int)(elements - i); |
| 359 | for (int j = 0; j < lim; ++j) { out[i + j] = transform<T>(o, j); } |
| 360 | } |
| 361 | |
| 362 | state_write(state, l_state); |
| 363 | } |
| 364 | |
| 365 | template<typename T> |
| 366 | void normalDistributionMT(T *out, size_t elements, uint *const state, |
nothing calls this directly
no test coverage detected