projects
/
libcds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4597fcc
)
Constrain parallel map keys to a smaller range
author
Peizhao Ou
<peizhaoo@uci.edu>
Thu, 15 Feb 2018 22:17:41 +0000
(14:17 -0800)
committer
Peizhao Ou
<peizhaoo@uci.edu>
Thu, 15 Feb 2018 22:17:41 +0000
(14:17 -0800)
test/stress/map/insdelfind/map_insdelfind.h
patch
|
blob
|
history
diff --git
a/test/stress/map/insdelfind/map_insdelfind.h
b/test/stress/map/insdelfind/map_insdelfind.h
index 296b1dad3d040a25d6664489cb92a0f12e9a5c1e..69cb7021b4c079f86c9845cd2204ab427940711e 100644
(file)
--- a/
test/stress/map/insdelfind/map_insdelfind.h
+++ b/
test/stress/map/insdelfind/map_insdelfind.h
@@
-143,11
+143,12
@@
namespace map {
unsigned int i = 0;
size_t const nNormalize = size_t(-1) / ( s_nMapSize * 2 );
+ size_t const nKeyRange = s_nMapSize * 4;
size_t nRand = 0;
for (size_t pCount = 0; pCount < s_nPassCount; pCount++) {
nRand = cds::bitop::RandXorShift( nRand );
- size_t key = nRand
/ nNormal
ize;
+ size_t key = nRand
% nKeyRange + s_nMapS
ize;
nRand = cds::bitop::RandXorShift( nRand );
size_t value = nRand / nNormalize;
switch ( s_arrShuffle[i] ) {