onnxruntime/cmake/external/abseil-cpp.natvis
Changming Sun 2bef89c171
Upgrade absl to the latest released version (#22365)
### Description
Resolve #21976 .  
 
ABSL generally does not have forward/backward compatibility. Our code is
only compatible with one fixed LTS version. So it's important to fix the
version number there when using find_package to detect an installed
version.
2024-10-09 20:21:40 -07:00

79 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="absl::lts_20240722::InlinedVector&lt;*&gt;">
<Intrinsic Name="_size" Expression="storage_.metadata_.value >> 1"/>
<Intrinsic Name="_is_allocated" Expression="(storage_.metadata_.value &amp; 1) == 1"/>
<Intrinsic Name="_inlined_data" Expression="($T1*)storage_.data_.inlined.inlined_data"/>
<Intrinsic Name="_allocated_data" Expression="storage_.data_.allocated.allocated_data"/>
<DisplayString>{{ size={ _size() }}}</DisplayString>
<Expand>
<Item Name="[capacity]" ExcludeView="simple" Condition="!_is_allocated()">$T2</Item>
<Item Name="[capacity]" ExcludeView="simple" Condition="_is_allocated()">storage_.data_.allocated.allocated_capacity</Item>
<Item Name="[N]" ExcludeView="simple">$T2</Item>
<Item Name="[size]" ExcludeView="simple">_size()</Item>
<Item Name="[is_allocated]" ExcludeView="simple">_is_allocated()</Item>
<Item Name="[allocator]" ExcludeView="simple" Condition="_is_allocated()">storage_.metadata_</Item>
<IndexListItems Condition="!_is_allocated()">
<Size>_size()</Size>
<ValueNode>_inlined_data()[$i]</ValueNode>
</IndexListItems>
<IndexListItems Condition="_is_allocated()">
<Size>_size()</Size>
<ValueNode>_allocated_data()[$i]</ValueNode>
</IndexListItems>
</Expand>
</Type>
<!-- Should handle both flat hash_set and hash_map -->
<Type Name="absl::lts_20240116::container_internal::raw_hash_set&lt;*&gt;">
<Intrinsic Name="_commonfields" Expression="settings_.value"/>
<Intrinsic Name="_size" Expression="settings_.value.compressed_tuple_.value"/>
<Intrinsic Name="_capacity" Expression="_commonfields().capacity_"/>
<Intrinsic Name="_control" Expression="_commonfields().control_"/>
<Intrinsic Name="_slots" Expression="(slot_type*)(_commonfields().slots_)"/>
<DisplayString IncludeView="noparens">size={ _size() }</DisplayString>
<DisplayString ExcludeView="noparens">size=({_size()})</DisplayString>
<Expand>
<Item Name="[Size]">_size()</Item>
<Item Name="[Capacity]" ExcludeView="noparens">_capacity()</Item>
<CustomListItems MaxItemsPerView="100">
<Variable Name="nslot" InitialValue="0" />
<Size>_size()</Size>
<Loop>
<!-- bool IsFull(ctrl_t c) const { return c >= 0; } -->
<If Condition="_control()[nslot] &gt;= 0">
<Item>_slots()[nslot]</Item>
</If>
<Exec>nslot++</Exec>
<Break Condition="nslot == _capacity()" />
</Loop>
</CustomListItems>
</Expand>
</Type>
<!-- Primitive types stored as a value -->
<Type Name="absl::lts_20240116::container_internal::Storage&lt;*,*,0&gt;">
<DisplayString IncludeView="noparens">*($T1 *){value}</DisplayString>
<DisplayString ExcludeView="noparens">(*($T1 *){value})</DisplayString>
<Expand>
<ExpandedItem>*($T1 *){value}</ExpandedItem>
</Expand>
</Type>
<!-- For storage inherited from the type -->
<Type Name="absl::lts_20240116::container_internal::Storage&lt;*,*,1&gt;">
<DisplayString IncludeView="noparens">*($T1 *)this</DisplayString>
<DisplayString ExcludeView="noparens">(*($T1 *)this)</DisplayString>
<Expand>
<ExpandedItem>*($T1 *)this</ExpandedItem>
</Expand>
</Type>
<Type Name="absl::lts_20240116::container_internal::map_slot_type&lt;*&gt;">
<DisplayString IncludeView="noparens">{value.first}, {value.second}</DisplayString>
<DisplayString ExcludeView="noparens">({value.first}, {value.second})</DisplayString>
<Expand>
<Item Name="first" ExcludeView="simple">value.first</Item>
<Item Name="second" ExcludeView="simple">value.second</Item>
</Expand>
</Type>
</AutoVisualizer>