mem-ruby,misc: Fix RNG range (#1842)
This upper range must be `UINT_MAX - 1`. This was previously fixed but reverted back. Without this the RNG crashes.
This commit is contained in:
@@ -64,9 +64,10 @@ AddressManager::AddressManager(int n_atomic_locs, int n_normal_locs_per_atomic)
|
|||||||
randAddressMap.begin(),
|
randAddressMap.begin(),
|
||||||
randAddressMap.end(),
|
randAddressMap.end(),
|
||||||
|
|
||||||
// TODO: This is a bug unrelated to this draft PR but the GPU tester is
|
// Note: This RNG has an upper bound of UINT_MAX - 1. This will fail
|
||||||
// useful for testing this PR.
|
// if the number of locations exceeds this value. Please do not
|
||||||
std::default_random_engine(rng->random<unsigned>(0,UINT_MAX))
|
// change this.
|
||||||
|
std::default_random_engine(rng->random<unsigned>(0,UINT_MAX - 1))
|
||||||
);
|
);
|
||||||
|
|
||||||
// initialize atomic locations
|
// initialize atomic locations
|
||||||
|
|||||||
Reference in New Issue
Block a user