[libc-commits] [libc] [libc] Add Generic and NVPTX Sin Benchmark (PR #99795)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Jul 29 19:36:18 PDT 2024
jhuber6 wrote:
> Ah, did you want to run `srand()` for every benchmark? Right now I have the call to `srand()` inside only the benchmark that uses it (e.g. `BM_RANDOM_INPUT` in `sin_benchmark.cpp`). I was thinking that way each iteration would definitely get a different value, if that makes sense
`srand()` just initializes the seed, the implementation shares the global random state with every thread so we can just have a single one initialize it to something other than `1`.
https://github.com/llvm/llvm-project/pull/99795
More information about the libc-commits
mailing list