equal
deleted
inserted
replaced
68 _nterminateflush(0), |
68 _nterminateflush(0), |
69 _ntrycomplete(0), |
69 _ntrycomplete(0), |
70 _ncontinue(0), |
70 _ncontinue(0), |
71 _nworkers(0) {} |
71 _nworkers(0) {} |
72 |
72 |
|
73 bool ZMark::is_initialized() const { |
|
74 return _allocator.is_initialized(); |
|
75 } |
|
76 |
73 size_t ZMark::calculate_nstripes(uint nworkers) const { |
77 size_t ZMark::calculate_nstripes(uint nworkers) const { |
74 // Calculate the number of stripes from the number of workers we use, |
78 // Calculate the number of stripes from the number of workers we use, |
75 // where the number of stripes must be a power of two and we want to |
79 // where the number of stripes must be a power of two and we want to |
76 // have at least one worker per stripe. |
80 // have at least one worker per stripe. |
77 const size_t nstripes = ZUtils::round_down_power_of_2(nworkers); |
81 const size_t nstripes = ZUtils::round_down_power_of_2(nworkers); |