MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / Random_int

Function Random_int

Src/Base/AMReX_Random.cpp:154–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

152}
153
154unsigned int Random_int (unsigned int n)
155{
156 if (n == 0) {return 0;}
157 std::uniform_int_distribution<unsigned int> distribution(0, n-1);
158 int tid = OpenMP::get_thread_num();
159 return distribution(generators[tid]);
160}
161
162ULong Random_long (ULong n)
163{

Callers 8

initDataFunction · 0.85
mainFunction · 0.85
testFunction · 0.85
mainFunction · 0.85
AMREX_FORCE_INLINEFunction · 0.85
UniqueRandomSubsetFunction · 0.85
amrex_random_intFunction · 0.85
TestFunctionCallsFunction · 0.85

Calls 1

get_thread_numFunction · 0.85

Tested by 1

TestFunctionCallsFunction · 0.68