Hi David. On 2017/11/14 13:00, David Rowley wrote: > On 13 November 2017 at 22:46, Amit Langote wrote: >> On 2017/11/10 12:30, Kyotaro HORIGUCHI wrote: >>> The following uses a bit tricky bitmap operation but >>> is straightforward as a whole. >>> >>> ===== >>> /* fill the bits upper from BITNUM(lower) (0-based) of the first word */ >>> a->workds[wordnum++] += ~(bitmapword)((1 << BITNUM(lower)) - 1); >>> >>> /* fill up intermediate words */ >>> while (wordnum < uwordnum) >>> a->words[wordnum++] = ~(bitmapword) 0; >>> >>> /* fill up to BITNUM(upper) bit (0-based) of the last word */ >>> a->workds[wordnum++] |= >>> (~(bitmapword) 0) >> (BITS_PER_BITMAPWORD - (BITNUM(upper) - 1)); >>> ===== >> >> Considering also the David's comment downthread, I will try to incorporate >> this into bms_add_range(). > > I've attached an implementation of the patch using this method.
[ ... ] > Probably just go with Kyotaro's idea (v2). I don't think this is worth > debating, I just wanted to show it's not that clear-cut. Thanks. I have incorporated the v2 patch in my local repository. I'm still working through some of the review comments and will be able to post a new version no later than tomorrow, including support for the new hash partitioning. Thanks, Amit