* We support both "Type 1" (default) and "Type 2" variants from [3],
* and also both "1-pass" (default) and "m-pass" merging.
*
- * FIXME: And maybe also try the 1-tree representation.
+ * FIXME: Maybe also try the 1-tree representation.
*/
# if !defined(HEAP_RANK_PAIRING_TYPE1) && !defined(HEAP_RANK_PAIRING_TYPE2)
// @parent pointers in the list are undefined.
// Allocate array of buckets -- per-rank storage for an odd half-tree used during the merge.
- // To achieve constant time, we track current subset of visited ranks in a bitmask, other indices stay undefined.
+ // To achieve constant time initialization, we track current subset of visited ranks in a bitmask, other indices stay undefined.
+ // Alternatively we could spend O(max current rank) time for initializations, the amortized complexity would be same.
P(node_p) bucket[HEAP_MAX_RANK + 1];
byte bucket_ary[HEAP_MAX_RANK + 1];
byte bucket_count = 0;
// @left, @parent and @mark fields in the list are undefined.
// Allocate array of buckets -- per-rank storage for an odd tree used during the merge.
- // To achieve constant time, we track current subset of visited ranks in a bitmask, other indices stay undefined.
+ // To achieve constant time initialization, we track current subset of visited ranks in a bitmask, other indices stay undefined.
+ // Alternatively we could spend O(max current rank) time for initializations, the amortized complexity would be same.
P(node_p) bucket[HEAP_MAX_RANK + 1];
byte bucket_ary[HEAP_MAX_RANK + 1];
byte bucket_count = 0;