-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathchash.natvis
105 lines (105 loc) · 4.57 KB
/
chash.natvis
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="contiguous_hash<*>">
<DisplayString>{{ size={root_.size - root_.free_count} }}</DisplayString>
<Expand>
<Item Name="[hasher]" ExcludeView="simple">(hasher &)root_</Item>
<Item Name="[key_equal]" ExcludeView="simple">(key_equal &)root_</Item>
<Item Name="[allocator]" ExcludeView="simple">(bucket_allocator_t &)root_</Item>
<Item Name="[allocator]" ExcludeView="simple">(index_allocator_t &)root_</Item>
<Item Name="[allocator]" ExcludeView="simple">(value_allocator_t &)root_</Item>
<Item Name="[raw]">root_</Item>
<CustomListItems Condition="root_.size - root_.free_count != 0">
<Variable InitialValue="0" Name="index"/>
<Loop>
<If Condition="index >= root_.size">
<Break/>
</If>
<If Condition="root_.index[index].hash.hash != ~hash_value_type(0)">
<Item Name="[{index}]">*(value_type *)&root_.value[index].value_pod</Item>
</If>
<Exec>++index</Exec>
</Loop>
</CustomListItems>
</Expand>
</Type>
<Type Name="contiguous_hash<*>::iterator">
<AlternativeType Name="contiguous_hash<*>::const_iterator" />
<DisplayString Condition="offset != self->root_.size">{*(value_type *)&self->root_.value[offset].value_pod}</DisplayString>
<DisplayString Condition="offset == self->root_.size">end</DisplayString>
<Expand>
<Item Condition="offset != self->root_.size" Name="[ptr]">*(value_type *)&self->root_.value[offset].value_pod</Item>
</Expand>
</Type>
<Type Name="contiguous_hash<*>::local_iterator">
<AlternativeType Name="contiguous_hash<*>::const_local_iterator" />
<DisplayString Condition="offset != offset_empty">{*(value_type *)&self->root_.value[offset].value_pod}</DisplayString>
<DisplayString Condition="offset == offset_empty">end</DisplayString>
<Expand>
<Item Condition="offset != offset_empty" Name="[ptr]">*(value_type *)&self->root_.value[offset].value_pod</Item>
</Expand>
</Type>
<Type Name="contiguous_hash<*>::root_t">
<DisplayString>{{ bucket={bucket_count}, capacity={capacity} }}</DisplayString>
<Expand>
<Synthetic Name="[bucket]">
<DisplayString>{{ size={bucket_count} }}</DisplayString>
<Expand>
<ArrayItems>
<Size>bucket_count</Size>
<ValuePointer>bucket</ValuePointer>
</ArrayItems>
</Expand>
</Synthetic>
<Synthetic Name="[index]">
<DisplayString>{{ size={size - free_count}, capacity={capacity} }}</DisplayString>
<Expand>
<Item Name="[capacity]">capacity</Item>
<Item Name="[size]">size - free_count</Item>
<ArrayItems>
<Size>size</Size>
<ValuePointer>index</ValuePointer>
</ArrayItems>
</Expand>
</Synthetic>
<Synthetic Name="[value]">
<DisplayString>{{ size={size - free_count}, capacity={capacity} }}</DisplayString>
<Expand>
<Item Name="[capacity]">capacity</Item>
<Item Name="[size]">size - free_count</Item>
<ArrayItems>
<Size>size</Size>
<ValuePointer>value</ValuePointer>
</ArrayItems>
</Expand>
</Synthetic>
<Synthetic Name="[free_list]">
<DisplayString>{{ size={free_count} }}</DisplayString>
<Expand>
<CustomListItems>
<Variable InitialValue="0" Name="i"/>
<Variable InitialValue="free_list" Name="current"/>
<Loop>
<If Condition="current == offset_empty">
<Break/>
</If>
<Item Name="[{i}]">current</Item>
<Exec>++i</Exec>
<Exec>current = index[current].next</Exec>
</Loop>
</CustomListItems>
</Expand>
</Synthetic>
<Item Name="[used]">size</Item>
<Item Name="[load_factor]" Condition="bucket_count != 0">(size - free_count) / float(bucket_count)</Item>
<Item Name="[max_load_factor]">setting_load_factor</Item>
</Expand>
</Type>
<Type Name="contiguous_hash<*>::hash_t">
<DisplayString Condition="hash != ~hash_value_type(0)">{hash}</DisplayString>
<DisplayString Condition="hash == ~hash_value_type(0)">empty</DisplayString>
</Type>
<Type Name="contiguous_hash<*>::value_t">
<DisplayString>{*(value_type *)&value_pod}</DisplayString>
</Type>
</AutoVisualizer>