mirror of
https://github.com/Blinue/Magpie.git
synced 2026-06-24 02:04:10 +00:00
chore: 添加 parallel-hashmap 依赖和 natvis
This commit is contained in:
parent
f4fa5092d7
commit
de0d833271
5 changed files with 213 additions and 0 deletions
10
Magpie.sln
10
Magpie.sln
|
|
@ -31,6 +31,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Effects", "src\Effects\Effe
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Magpie.Core", "src\Magpie.Core\Magpie.Core.vcxproj", "{0E5205AE-DFA9-4CB8-B662-E43CD6512E2A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Natvis", "Natvis", "{9808D34F-5715-4D02-B216-4CB80F46BBC0}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
natvis\magpie.natvis = natvis\magpie.natvis
|
||||
natvis\phmap.natvis = natvis\phmap.natvis
|
||||
natvis\rapidjson.natvis = natvis\rapidjson.natvis
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|ARM64 = Debug|ARM64
|
||||
|
|
@ -83,6 +90,9 @@ Global
|
|||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{9808D34F-5715-4D02-B216-4CB80F46BBC0} = {00AB63C3-0CD3-4944-B8E6-58C86138618D}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {0114F74A-3B0C-43A4-AA0E-AB36FD4935F8}
|
||||
EndGlobalSection
|
||||
|
|
|
|||
25
natvis/magpie.natvis
Normal file
25
natvis/magpie.natvis
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<Type Name="SmallVectorImpl<*>">
|
||||
<DisplayString IncludeView ="elt0" Condition="Size == 0"></DisplayString>
|
||||
<DisplayString IncludeView ="elt0">{(($T1*)BeginX)[0]}{*this,view(elt1)}</DisplayString>
|
||||
<DisplayString IncludeView ="elt1" Condition="Size == 1"></DisplayString>
|
||||
<DisplayString IncludeView ="elt1">, {(($T1*)BeginX)[1]}{*this,view(elt2)}</DisplayString>
|
||||
<DisplayString IncludeView ="elt2" Condition="Size == 2"></DisplayString>
|
||||
<DisplayString IncludeView ="elt2">, {(($T1*)BeginX)[2]}{*this,view(elt3)}</DisplayString>
|
||||
<DisplayString IncludeView ="elt3" Condition="Size == 3"></DisplayString>
|
||||
<DisplayString IncludeView ="elt3">, {(($T1*)BeginX)[3]}{*this,view(elt4)}</DisplayString>
|
||||
<DisplayString IncludeView ="elt4" Condition="Size == 4"></DisplayString>
|
||||
<DisplayString IncludeView ="elt4">, /* {Size - 4} more*/ </DisplayString>
|
||||
<DisplayString Condition="Size == 0">empty</DisplayString>
|
||||
<DisplayString Condition="Size != 0">{{{*this,view(elt0)}}}</DisplayString>
|
||||
<DisplayString>Uninitialized</DisplayString>
|
||||
<Expand>
|
||||
<Item Name="[size]">Size</Item>
|
||||
<Item Name="[capacity]">Capacity</Item>
|
||||
<ArrayItems>
|
||||
<Size>Size</Size>
|
||||
<ValuePointer>($T1*)BeginX</ValuePointer>
|
||||
</ArrayItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
</AutoVisualizer>
|
||||
140
natvis/phmap.natvis
Normal file
140
natvis/phmap.natvis
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<!-- flat map/set -->
|
||||
<Type Name="phmap::flat_hash_set<*,*,*,*>">
|
||||
<AlternativeType Name="phmap::flat_hash_map<*,*,*,*,*>" />
|
||||
<DisplayString>{{size = {size_}}}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems MaxItemsPerView="1000" ExcludeView="Test">
|
||||
<Variable Name="ctrl" InitialValue="ctrl_" />
|
||||
<Variable Name="slot" InitialValue="slots_" />
|
||||
<Variable Name="ctrl_end" InitialValue="ctrl_ + capacity_" />
|
||||
<Variable Name="slot_end" InitialValue="slots_ + capacity_" />
|
||||
|
||||
<Size>size_</Size>
|
||||
<Loop>
|
||||
<Break Condition="slot == slot_end" />
|
||||
<If Condition="*ctrl >= -1">
|
||||
<Item>*slot,na</Item>
|
||||
</If>
|
||||
<Exec>++slot</Exec>
|
||||
<Exec>++ctrl</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<!-- node map/set - only difference is the **slot instead of *slot -->
|
||||
<Type Name="phmap::node_hash_set<*,*,*,*>">
|
||||
<AlternativeType Name="phmap::node_hash_map<*,*,*,*,*>" />
|
||||
<DisplayString>{{size = {size_}}}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems MaxItemsPerView="1000" ExcludeView="Test">
|
||||
<Variable Name="ctrl" InitialValue="ctrl_" />
|
||||
<Variable Name="slot" InitialValue="slots_" />
|
||||
<Variable Name="ctrl_end" InitialValue="ctrl_ + capacity_" />
|
||||
<Variable Name="slot_end" InitialValue="slots_ + capacity_" />
|
||||
|
||||
<Size>size_</Size>
|
||||
<Loop>
|
||||
<Break Condition="slot == slot_end" />
|
||||
<If Condition="*ctrl >= -1">
|
||||
<Item>**slot,na</Item>
|
||||
</If>
|
||||
<Exec>++slot</Exec>
|
||||
<Exec>++ctrl</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="phmap::priv::map_slot_type<*,*>">
|
||||
<DisplayString>{value}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<!-- flat map iterators -->
|
||||
<Type Name="phmap::priv::raw_hash_set<*,*,*,*>::iterator">
|
||||
<DisplayString Condition="ctrl_ == 0">unset</DisplayString>
|
||||
<DisplayString Condition="!(*ctrl_ >= 0)">end()</DisplayString>
|
||||
<DisplayString>{*slot_,na}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<!-- node map iterators - only difference is the **slot_ instead of * -->
|
||||
<Type Name="phmap::priv::raw_hash_set<phmap::priv::NodeHashSetPolicy<*>,*,*,*>::iterator">
|
||||
<DisplayString Condition="ctrl_ == 0">unset</DisplayString>
|
||||
<DisplayString Condition="!(*ctrl_ >= 0)">end()</DisplayString>
|
||||
<DisplayString>{**slot_,na}</DisplayString>
|
||||
</Type>
|
||||
|
||||
<!-- parallel flat/node set -->
|
||||
<Type Name="phmap::parallel_flat_hash_set<*,*,*,*,*,*>">
|
||||
<AlternativeType Name="phmap::parallel_node_hash_set<*,*,*,*,*,*>" />
|
||||
<DisplayString>{{size = ?}}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems MaxItemsPerView="1000" ExcludeView="Test">
|
||||
<Variable Name="idx" InitialValue="0" />
|
||||
<Variable Name="maxidx" InitialValue="$T5" />
|
||||
<Variable Name="ctrl" InitialValue="sets_._Elems[0].set_.ctrl_" />
|
||||
<Variable Name="slot" InitialValue="sets_._Elems[0].set_.slots_" />
|
||||
<Variable Name="ctrl_end" InitialValue="sets_._Elems[0].set_.ctrl_" />
|
||||
<Variable Name="slot_end" InitialValue="sets_._Elems[0].set_.slots_" />
|
||||
<Exec>maxidx = 2 << maxidx</Exec>
|
||||
<Loop>
|
||||
<Break Condition="idx == maxidx" />
|
||||
<Exec>ctrl = sets_._Elems[idx].set_.ctrl_</Exec>
|
||||
<Exec>slot = sets_._Elems[idx].set_.slots_</Exec>
|
||||
<Exec>ctrl_end = sets_._Elems[idx].set_.ctrl_ + sets_._Elems[idx].set_.capacity_</Exec>
|
||||
<Exec>slot_end = sets_._Elems[idx].set_.slots_ + sets_._Elems[idx].set_.capacity_</Exec>
|
||||
<Loop>
|
||||
<Break Condition="slot == slot_end" />
|
||||
<If Condition="*ctrl >= -1">
|
||||
<Item>*slot,na</Item>
|
||||
</If>
|
||||
<Exec>++slot</Exec>
|
||||
<Exec>++ctrl</Exec>
|
||||
</Loop>
|
||||
<Exec>++idx</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<!-- parallel flat/node map - only difference is $T6 instead of $T5 -->
|
||||
<Type Name="phmap::parallel_flat_hash_map<*,*,*,*,*,*,*>">
|
||||
<AlternativeType Name="phmap::parallel_node_hash_map<*,*,*,*,*,*,*>" />
|
||||
<DisplayString>{{size = ?}}</DisplayString>
|
||||
<Expand>
|
||||
<CustomListItems MaxItemsPerView="1000" ExcludeView="Test">
|
||||
<Variable Name="idx" InitialValue="0" />
|
||||
<Variable Name="maxidx" InitialValue="$T6" />
|
||||
<Variable Name="ctrl" InitialValue="sets_._Elems[0].set_.ctrl_" />
|
||||
<Variable Name="slot" InitialValue="sets_._Elems[0].set_.slots_" />
|
||||
<Variable Name="ctrl_end" InitialValue="sets_._Elems[0].set_.ctrl_" />
|
||||
<Variable Name="slot_end" InitialValue="sets_._Elems[0].set_.slots_" />
|
||||
<Exec>maxidx = 2 << maxidx</Exec>
|
||||
<Loop>
|
||||
<Break Condition="idx == maxidx" />
|
||||
<Exec>ctrl = sets_._Elems[idx].set_.ctrl_</Exec>
|
||||
<Exec>slot = sets_._Elems[idx].set_.slots_</Exec>
|
||||
<Exec>ctrl_end = sets_._Elems[idx].set_.ctrl_ + sets_._Elems[idx].set_.capacity_</Exec>
|
||||
<Exec>slot_end = sets_._Elems[idx].set_.slots_ + sets_._Elems[idx].set_.capacity_</Exec>
|
||||
<Loop>
|
||||
<Break Condition="slot == slot_end" />
|
||||
<If Condition="*ctrl >= -1">
|
||||
<Item>*slot,na</Item>
|
||||
</If>
|
||||
<Exec>++slot</Exec>
|
||||
<Exec>++ctrl</Exec>
|
||||
</Loop>
|
||||
<Exec>++idx</Exec>
|
||||
</Loop>
|
||||
</CustomListItems>
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
<Type Name="phmap::priv::parallel_hash_set<*,*,*,*,*,*,*>::iterator">
|
||||
<DisplayString>{it_,na}</DisplayString>
|
||||
</Type>
|
||||
|
||||
</AutoVisualizer>
|
||||
37
natvis/rapidjson.natvis
Normal file
37
natvis/rapidjson.natvis
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
||||
<!-- rapidjson::GenericValue - basic support -->
|
||||
<Type Name="rapidjson::GenericValue<*,*>">
|
||||
<DisplayString Condition="(data_.f.flags & kTypeMask) == rapidjson::kNullType">null</DisplayString>
|
||||
<DisplayString Condition="data_.f.flags == kTrueFlag">true</DisplayString>
|
||||
<DisplayString Condition="data_.f.flags == kFalseFlag">false</DisplayString>
|
||||
<DisplayString Condition="data_.f.flags == kShortStringFlag">{(const Ch*)data_.ss.str,na}</DisplayString>
|
||||
<DisplayString Condition="(data_.f.flags & kTypeMask) == rapidjson::kStringType">{(const Ch*)((size_t)data_.s.str & 0x0000FFFFFFFFFFFF),[data_.s.length]na}</DisplayString>
|
||||
<DisplayString Condition="(data_.f.flags & kNumberIntFlag) == kNumberIntFlag">{data_.n.i.i}</DisplayString>
|
||||
<DisplayString Condition="(data_.f.flags & kNumberUintFlag) == kNumberUintFlag">{data_.n.u.u}</DisplayString>
|
||||
<DisplayString Condition="(data_.f.flags & kNumberInt64Flag) == kNumberInt64Flag">{data_.n.i64}</DisplayString>
|
||||
<DisplayString Condition="(data_.f.flags & kNumberUint64Flag) == kNumberUint64Flag">{data_.n.u64}</DisplayString>
|
||||
<DisplayString Condition="(data_.f.flags & kNumberDoubleFlag) == kNumberDoubleFlag">{data_.n.d}</DisplayString>
|
||||
<DisplayString Condition="data_.f.flags == rapidjson::kObjectType">Object members={data_.o.size}</DisplayString>
|
||||
<DisplayString Condition="data_.f.flags == rapidjson::kArrayType">Array members={data_.a.size}</DisplayString>
|
||||
<Expand>
|
||||
<Item Condition="data_.f.flags == rapidjson::kObjectType" Name="[size]">data_.o.size</Item>
|
||||
<Item Condition="data_.f.flags == rapidjson::kObjectType" Name="[capacity]">data_.o.capacity</Item>
|
||||
<ArrayItems Condition="data_.f.flags == rapidjson::kObjectType">
|
||||
<Size>data_.o.size</Size>
|
||||
<!-- NOTE: Rapidjson stores some extra data in the high bits of pointers, which is why the mask -->
|
||||
<ValuePointer>(rapidjson::GenericMember<$T1,$T2>*)(((size_t)data_.o.members) & 0x0000FFFFFFFFFFFF)</ValuePointer>
|
||||
</ArrayItems>
|
||||
|
||||
<Item Condition="data_.f.flags == rapidjson::kArrayType" Name="[size]">data_.a.size</Item>
|
||||
<Item Condition="data_.f.flags == rapidjson::kArrayType" Name="[capacity]">data_.a.capacity</Item>
|
||||
<ArrayItems Condition="data_.f.flags == rapidjson::kArrayType">
|
||||
<Size>data_.a.size</Size>
|
||||
<!-- NOTE: Rapidjson stores some extra data in the high bits of pointers, which is why the mask -->
|
||||
<ValuePointer>(rapidjson::GenericValue<$T1,$T2>*)(((size_t)data_.a.elements) & 0x0000FFFFFFFFFFFF)</ValuePointer>
|
||||
</ArrayItems>
|
||||
|
||||
</Expand>
|
||||
</Type>
|
||||
|
||||
</AutoVisualizer>
|
||||
|
|
@ -6,6 +6,7 @@ yas/7.1.0
|
|||
rapidjson/cci.20220822
|
||||
zstd/1.5.2
|
||||
imgui/1.87
|
||||
parallel-hashmap/1.37
|
||||
|
||||
[generators]
|
||||
visual_studio
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue