Map a bucket index to the primary vShard in that bucket's range.
(bucket: u32, prefix_bits: u8)
| 116 | |
| 117 | /// Map a bucket index to the primary vShard in that bucket's range. |
| 118 | fn bucket_to_vshard(bucket: u32, prefix_bits: u8) -> u32 { |
| 119 | let stride = vshard_stride(prefix_bits); |
| 120 | bucket.saturating_mul(stride) |
| 121 | } |
| 122 | |
| 123 | /// Number of vShards per Hilbert bucket. |
| 124 | /// |
no test coverage detected