forked from boostorg/unordered
163 lines
8.7 KiB
XML
163 lines
8.7 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!--
|
|
Copyright 2024 Braden Ganetsky.
|
|
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
|
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
|
-->
|
|
|
|
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
|
|
|
|
<!-- FCA containers -->
|
|
|
|
<Type Name="boost::unordered::detail::functions<*>" Inheritable="false">
|
|
<Intrinsic Name="active_idx" Expression="current_ & 1" />
|
|
<Intrinsic Name="spare_idx" Expression="1 - active_idx()" />
|
|
<Intrinsic Name="has_spare" Expression="(current_ & 2) != 0" />
|
|
|
|
<Intrinsic Name="hash" Expression="*reinterpret_cast<$T1*>(static_cast<function_pair::base1*>(&funcs_[idx].t_))">
|
|
<Parameter Name="idx" Type="size_t" />
|
|
</Intrinsic>
|
|
<Intrinsic Name="key_eq" Expression="*reinterpret_cast<$T2*>(static_cast<function_pair::base2*>(&funcs_[idx].t_))">
|
|
<Parameter Name="idx" Type="size_t" />
|
|
</Intrinsic>
|
|
|
|
<Expand>
|
|
<Item Name="[hash_function]">hash(active_idx())</Item>
|
|
<Item Name="[key_eq]">key_eq(active_idx())</Item>
|
|
<Item Name="[spare_hash_function]" Condition="has_spare()">hash(spare_idx())</Item>
|
|
<Item Name="[spare_key_eq]" Condition="has_spare()">key_eq(spare_idx())</Item>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::detail::grouped_bucket_array<*>" Inheritable="false">
|
|
<Expand>
|
|
<CustomListItems MaxItemsPerView="100">
|
|
<Variable Name="size" InitialValue="size_" />
|
|
<Variable Name="bucket_index" InitialValue="0" />
|
|
<Variable Name="current_bucket" InitialValue="&buckets[bucket_index]" />
|
|
<Variable Name="node" InitialValue="current_bucket->next" />
|
|
<Loop Condition="bucket_index != size">
|
|
<Exec>current_bucket = &buckets[bucket_index]</Exec>
|
|
<Exec>node = current_bucket->next</Exec>
|
|
<Loop Condition="node != nullptr">
|
|
<Item>node->buf.t_</Item>
|
|
<Exec>node = node->next</Exec>
|
|
</Loop>
|
|
<Exec>++bucket_index</Exec>
|
|
</Loop>
|
|
</CustomListItems>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::detail::grouped_bucket_array<*>" Inheritable="false" IncludeView="MapHelper">
|
|
<Expand>
|
|
<CustomListItems MaxItemsPerView="100">
|
|
<Variable Name="size" InitialValue="size_" />
|
|
<Variable Name="bucket_index" InitialValue="0" />
|
|
<Variable Name="current_bucket" InitialValue="&buckets[bucket_index]" />
|
|
<Variable Name="node" InitialValue="current_bucket->next" />
|
|
<Loop Condition="bucket_index != size">
|
|
<Exec>current_bucket = &buckets[bucket_index]</Exec>
|
|
<Exec>node = current_bucket->next</Exec>
|
|
<Loop Condition="node != nullptr">
|
|
<Item Name="[{node->buf.t_.first}]">node->buf.t_</Item>
|
|
<Exec>node = node->next</Exec>
|
|
</Loop>
|
|
<Exec>++bucket_index</Exec>
|
|
</Loop>
|
|
</CustomListItems>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::unordered_map<*>" Priority="Medium">
|
|
<AlternativeType Name="boost::unordered::unordered_multimap<*>" />
|
|
<AlternativeType Name="boost::unordered::unordered_set<*>" />
|
|
<AlternativeType Name="boost::unordered::unordered_multiset<*>" />
|
|
<DisplayString>{{ size={table_.size_} }}</DisplayString>
|
|
<Expand>
|
|
<Item Name="[bucket_count]" IncludeView="detailed">table_.buckets_.size_</Item>
|
|
<Item Name="[max_load_factor]" IncludeView="detailed">table_.mlf_</Item>
|
|
<ExpandedItem ExcludeView="simple">*reinterpret_cast<table::functions*>(&table_)</ExpandedItem>
|
|
<Item Name="[allocator]" ExcludeView="simple">*reinterpret_cast<table::bucket_array_type::node_allocator_type*>(&table_.buckets_)</Item>
|
|
<ExpandedItem>table_.buckets_</ExpandedItem>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::unordered_map<*>" Priority="MediumHigh" ExcludeView="ShowElementsByIndex">
|
|
<AlternativeType Name="boost::unordered::unordered_multimap<*>" />
|
|
<DisplayString>{{ size={table_.size_} }}</DisplayString>
|
|
<Expand>
|
|
<Item Name="[bucket_count]" IncludeView="detailed">table_.buckets_.size_</Item>
|
|
<Item Name="[max_load_factor]" IncludeView="detailed">table_.mlf_</Item>
|
|
<ExpandedItem ExcludeView="simple">*reinterpret_cast<table::functions*>(&table_)</ExpandedItem>
|
|
<Item Name="[allocator]" ExcludeView="simple">*reinterpret_cast<table::bucket_array_type::node_allocator_type*>(&table_.buckets_)</Item>
|
|
<ExpandedItem>table_.buckets_,view(MapHelper)</ExpandedItem>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<!-- FCA iterators -->
|
|
|
|
<Type Name="boost::unordered::detail::iterator_detail::iterator<*>" Inheritable="false">
|
|
<AlternativeType Name="boost::unordered::detail::iterator_detail::c_iterator<*>" />
|
|
<Intrinsic Name="valid" Expression="p != nullptr && itb.p != nullptr && itb.pbg != nullptr" />
|
|
<DisplayString Condition="valid()">{p->buf.t_}</DisplayString>
|
|
<DisplayString Condition="!valid()">{{ end iterator }}</DisplayString>
|
|
<Expand>
|
|
<ExpandedItem Condition="valid()">p->buf.t_</ExpandedItem>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<!-- FOA and CFOA helpers -->
|
|
|
|
<Type Name="boost::unordered::detail::foa::element_type<*>" Priority="Medium" Inheritable="false">
|
|
<DisplayString>{*p}</DisplayString>
|
|
<Expand>
|
|
<ExpandedItem>*p</ExpandedItem>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::detail::foa::element_type<std::pair<*>,*>" Priority="MediumHigh" Inheritable="false">
|
|
<!-- Manually expand when holding a `std::pair`, otherwise the debugger complains about recursion-->
|
|
<DisplayString>({p->first}, {p->second})</DisplayString>
|
|
<Expand>
|
|
<Item Name="first">p->first</Item>
|
|
<Item Name="second">p->second</Item>
|
|
</Expand>
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::detail::foa::plain_integral<*>" Inheritable="false">
|
|
<Intrinsic Name="get" Expression="n" />
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::detail::foa::atomic_integral<*>" Inheritable="false">
|
|
<Intrinsic Name="get" Expression="n._Storage._Value" />
|
|
</Type>
|
|
|
|
<Type Name="boost::unordered::detail::foa::group15<*>" Inheritable="false">
|
|
<Intrinsic Name="check_bit" Expression="(m[b].get() == 0) ? (1 << b) : 0">
|
|
<Parameter Name="b" Type="int" />
|
|
</Intrinsic>
|
|
<Intrinsic Name="__match_occupied_regular_layout_true" Expression="0x7FFF & ~(
|
|
check_bit( 0) + check_bit( 1) + check_bit( 2) + check_bit( 3) +
|
|
check_bit( 4) + check_bit( 5) + check_bit( 6) + check_bit( 7) +
|
|
check_bit( 8) + check_bit( 9) + check_bit(10) + check_bit(11) +
|
|
check_bit(12) + check_bit(13) + check_bit(14) + check_bit(15)
|
|
)" />
|
|
<Intrinsic Name="__match_occupied_x" Expression="m[0].get() | m[1].get()" />
|
|
<Intrinsic Name="__match_occupied_y" Expression="static_cast<uint32_t>(__match_occupied_x() | (__match_occupied_x() >> 32))" />
|
|
<Intrinsic Name="__match_occupied_regular_layout_false" Expression="0x7FFF & (__match_occupied_y() | (__match_occupied_y() >> 16))" />
|
|
<Intrinsic Name="match_occupied" Expression="regular_layout ? __match_occupied_regular_layout_true() : __match_occupied_regular_layout_false()" />
|
|
|
|
<Intrinsic Name="__is_sentinel_regular_layout_true" Expression="pos == N-1 && m[N-1].get() == sentinel_" >
|
|
<Parameter Name="pos" Type="size_t" />
|
|
</Intrinsic>
|
|
<Intrinsic Name="__is_sentinel_regular_layout_false" Expression="pos == N-1 && (m[0].get() & uint64_t(0x4000400040004000ull)) == uint64_t(0x4000ull) && (m[1].get() & uint64_t(0x4000400040004000ull))==0" >
|
|
<Parameter Name="pos" Type="size_t" />
|
|
</Intrinsic>
|
|
<Intrinsic Name="is_sentinel" Expression="regular_layout ? __is_sentinel_regular_layout_true(pos) : __is_sentinel_regular_layout_false(pos)" >
|
|
<Parameter Name="pos" Type="size_t" />
|
|
</Intrinsic>
|
|
</Type>
|
|
|
|
</AutoVisualizer>
|