|
30 | 30 | <Expand> |
31 | 31 | <Item Name="[size]">base.table.items</Item> |
32 | 32 | <Item Name="[capacity]">base.table.items + base.table.growth_left</Item> |
| 33 | + <Item Name="[state]">base.hash_builder</Item> |
33 | 34 |
|
34 | 35 | <CustomListItems> |
35 | 36 | <Variable Name="i" InitialValue="0" /> |
|
40 | 41 | <If Condition="(base.table.ctrl.pointer[i] & 0x80) == 0"> |
41 | 42 | <!-- Bucket is populated --> |
42 | 43 | <Exec>n--</Exec> |
43 | | - <Item Name="{base.table.data.pointer[i].__0}">base.table.data.pointer[i].__1</Item> |
| 44 | + <Item Name="{static_cast<tuple<$T1, $T2>*>(base.table.ctrl.pointer)[-(i + 1)].__0}">static_cast<tuple<$T1, $T2>*>(base.table.ctrl.pointer)[-(i + 1)].__1</Item> |
44 | 45 | </If> |
45 | 46 | <Exec>i++</Exec> |
46 | 47 | </Loop> |
|
53 | 54 | <Expand> |
54 | 55 | <Item Name="[size]">map.base.table.items</Item> |
55 | 56 | <Item Name="[capacity]">map.base.table.items + map.base.table.growth_left</Item> |
| 57 | + <Item Name="[state]">map.base.hash_builder</Item> |
56 | 58 |
|
57 | 59 | <CustomListItems> |
58 | 60 | <Variable Name="i" InitialValue="0" /> |
|
63 | 65 | <If Condition="(map.base.table.ctrl.pointer[i] & 0x80) == 0"> |
64 | 66 | <!-- Bucket is populated --> |
65 | 67 | <Exec>n--</Exec> |
66 | | - <Item>map.base.table.data.pointer[i].__0</Item> |
67 | | - </If> |
68 | | - <Exec>i++</Exec> |
69 | | - </Loop> |
70 | | - </CustomListItems> |
71 | | - </Expand> |
72 | | - </Type> |
73 | | - |
74 | | - <Type Name="hashbrown::raw::RawTable<*>"> |
75 | | - <!-- RawTable has a nice and simple layout. |
76 | | - items Number of *populated* values in the RawTable (less than the size of ctrl.pointer / data.pointer) |
77 | | - growth_left Remaining capacity before growth |
78 | | - ctrl.pointer[i] & 0x80 Indicates the bucket is empty / should be skipped / doesn't count towards items. |
79 | | - data.pointer[i] The (K,V) tuple, if not empty. |
80 | | - --> |
81 | | - <DisplayString>{{ size={items} }}</DisplayString> |
82 | | - <Expand> |
83 | | - <Item Name="[size]">items</Item> |
84 | | - <Item Name="[capacity]">items + growth_left</Item> |
85 | | - |
86 | | - <CustomListItems> |
87 | | - <Variable Name="i" InitialValue="0" /> |
88 | | - <Variable Name="n" InitialValue="items" /> |
89 | | - <Size>items</Size> |
90 | | - <Loop> |
91 | | - <Break Condition="n == 0" /> |
92 | | - <If Condition="(ctrl.pointer[i] & 0x80) == 0"> |
93 | | - <!-- Bucket is populated --> |
94 | | - <Exec>n--</Exec> |
95 | | - <Item>data.pointer[i]</Item> |
| 68 | + <Item>static_cast<$T1*>(map.base.table.ctrl.pointer)[-(i + 1)]</Item> |
96 | 69 | </If> |
97 | 70 | <Exec>i++</Exec> |
98 | 71 | </Loop> |
|
0 commit comments