From: Peizhao Ou Date: Thu, 15 Feb 2018 22:17:41 +0000 (-0800) Subject: Constrain parallel map keys to a smaller range X-Git-Url: http://plrg.eecs.uci.edu/git/?p=libcds.git;a=commitdiff_plain;h=cfd3f3c2a1658d166cc961e31a4b8c91e156ae30;ds=sidebyside Constrain parallel map keys to a smaller range --- diff --git a/test/stress/map/insdelfind/map_insdelfind.h b/test/stress/map/insdelfind/map_insdelfind.h index 296b1dad..69cb7021 100644 --- 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 / nNormalize; + size_t key = nRand % nKeyRange + s_nMapSize; nRand = cds::bitop::RandXorShift( nRand ); size_t value = nRand / nNormalize; switch ( s_arrShuffle[i] ) {