MCPcopy Create free account
hub / github.com/apache/arrow / GetRandomSeed

Function GetRandomSeed

cpp/src/arrow/util/io_util.cc:2146–2154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2144} // namespace
2145
2146int64_t GetRandomSeed() {
2147 // The process-global seed generator to aims to avoid calling std::random_device
2148 // unless truly necessary (it can block on some systems, see ARROW-10287).
2149 static auto seed_gen = GetSeedGenerator();
2150 static std::mutex seed_gen_mutex;
2151
2152 std::lock_guard<std::mutex> lock(seed_gen_mutex);
2153 return static_cast<int64_t>(seed_gen());
2154}
2155
2156uint64_t GetThreadId() {
2157 uint64_t equiv{0};

Callers 10

MakeMethod · 0.85
StartProducingMethod · 0.85
MakeMethod · 0.85
TESTFunction · 0.85
MakeRandomNameFunction · 0.85
RandomGeneratorHolderFunction · 0.85
RandomMethod · 0.85

Calls 1

GetSeedGeneratorFunction · 0.85

Tested by 3

TESTFunction · 0.68
RandomMethod · 0.68