forked from patrikhuber/eigen-natvis-imagewatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEigen.natvis
143 lines (118 loc) · 6.02 KB
/
Eigen.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" MenuName="Add to Image Watch"/>
<Type Name="Eigen::Matrix<*,*,*,*,*,*>">
<UIVisualizer ServiceId="{A452AFEA-3DF6-46BB-9177-C0B08F318025}" Id="1" />
</Type>
<!-- Fixed Sized Matrix -->
<Type Name="Eigen::Matrix<*,*,*,*,*,*>">
<Expand>
<Synthetic Name="[type]" Condition='strcmp("int", "$T1") == 0'>
<DisplayString>INT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("float", "$T1") == 0'>
<DisplayString>FLOAT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("double", "$T1") == 0'>
<DisplayString>FLOAT64</DisplayString>
</Synthetic>
<Item Name="[channels]">1</Item>
<Item Name="[rows]">$T2</Item>
<Item Name="[cols]">$T3</Item>
<Item Name="[width]" Condition="(Flags%2)">$T3</Item> <!-- Todo: These should be unconditional. width is always equal to cols and height is always equal to rows. Storage order (ColMajor or RowMajor) has nothing to do with it. -->
<Item Name="[width]" Condition="!(Flags%2)">$T2</Item>
<Item Name="[height]" Condition="(Flags%2)">$T2</Item>
<Item Name="[height]" Condition="!(Flags%2)">$T3</Item>
<Item Name="[data]">($T1*)(m_storage.m_data.array)</Item>
<!-- Note: We can specify a semicolon-separated list of the strides here (supposedly row- and col-strides). But I haven't gotten it to work yet. -->
<Synthetic Name="[stride]" Condition="(Flags%2)"> <!-- row major layout -->
<DisplayString>{$T3*sizeof($T1)}</DisplayString> <!-- Should be something like: {$T3*sizeof($T1)}; {sizeof($T1)} -->
</Synthetic>
<Synthetic Name="[stride]" Condition="!(Flags%2)"> <!-- col major layout -->
<DisplayString>{$T2*sizeof($T1)}</DisplayString>
</Synthetic>
</Expand>
</Type>
<!-- Dynamic Matrix -->
<Type Name="Eigen::Matrix<*,-1,-1,*,*,*>">
<DisplayString>h={m_storage.m_rows},w={m_storage.m_cols}</DisplayString>
<Expand>
<Synthetic Name="[type]" Condition='strcmp("int", "$T1") == 0'>
<DisplayString>INT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("float", "$T1") == 0'>
<DisplayString>FLOAT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("double", "$T1") == 0'>
<DisplayString>FLOAT64</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("__int64", "$T1") == 0'>
<DisplayString>INT64</DisplayString>
</Synthetic>
<Item Name="[channels]">1</Item>
<Item Name="[rows]">m_storage.m_rows</Item>
<Item Name="[cols]">m_storage.m_cols</Item>
<Item Name="[width]" Condition="(Flags%2)">m_storage.m_cols</Item>
<Item Name="[width]" Condition="!(Flags%2)">m_storage.m_rows</Item>
<Item Name="[height]" Condition="(Flags%2)">m_storage.m_rows</Item>
<Item Name="[height]" Condition="!(Flags%2)">m_storage.m_cols</Item>
<Item Name="[data]">(m_storage.m_data)</Item>
<Item Name="[stride]" Condition="(Flags%2)">m_storage.m_cols*sizeof($T1)</Item> <!-- row major layout -->
<Item Name="[stride]" Condition="!(Flags%2)">m_storage.m_rows*sizeof($T1)</Item> <!-- col major layout -->
</Expand>
</Type>
<!-- Dynamic Column Vector -->
<Type Name="Eigen::Matrix<*,-1,1,*,*,*>">
<Expand>
<Synthetic Name="[type]" Condition='strcmp("int", "$T1") == 0'>
<DisplayString>INT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("float", "$T1") == 0'>
<DisplayString>FLOAT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("double", "$T1") == 0'>
<DisplayString>FLOAT64</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("__int64", "$T1") == 0'>
<DisplayString>INT64</DisplayString>
</Synthetic>
<Item Name="[channels]">1</Item>
<Item Name="[rows]">m_storage.m_rows</Item>
<Item Name="[cols]">1</Item>
<Item Name="[width]" Condition="(Flags%2)">1</Item>
<Item Name="[width]" Condition="!(Flags%2)">m_storage.m_rows</Item>
<Item Name="[height]" Condition="(Flags%2)">m_storage.m_rows</Item>
<Item Name="[height]" Condition="!(Flags%2)">1</Item>
<Item Name="[data]">(m_storage.m_data)</Item>
<Item Name="[stride]" Condition="(Flags%2)">1*sizeof($T1)</Item> <!-- row major layout -->
<Item Name="[stride]" Condition="!(Flags%2)">m_storage.m_rows*sizeof($T1)</Item> <!-- col major layout -->
</Expand>
</Type>
<!-- Dynamic Row Vector -->
<Type Name="Eigen::Matrix<*,1,-1,*,*,*>">
<Expand>
<Synthetic Name="[type]" Condition='strcmp("int", "$T1") == 0'>
<DisplayString>INT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("float", "$T1") == 0'>
<DisplayString>FLOAT32</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("double", "$T1") == 0'>
<DisplayString>FLOAT64</DisplayString>
</Synthetic>
<Synthetic Name="[type]" Condition='strcmp("__int64", "$T1") == 0'>
<DisplayString>INT64</DisplayString>
</Synthetic>
<Item Name="[channels]">1</Item>
<Item Name="[rows]">1</Item>
<Item Name="[cols]">m_storage.m_cols</Item>
<Item Name="[width]" Condition="(Flags%2)">m_storage.m_cols</Item>
<Item Name="[width]" Condition="!(Flags%2)">1</Item>
<Item Name="[height]" Condition="(Flags%2)">1</Item>
<Item Name="[height]" Condition="!(Flags%2)">m_storage.m_cols</Item>
<Item Name="[data]">(m_storage.m_data)</Item>
<Item Name="[stride]" Condition="(Flags%2)">m_storage.m_cols*sizeof($T1)</Item> <!-- row major layout -->
<Item Name="[stride]" Condition="!(Flags%2)">1*sizeof($T1)</Item> <!-- col major layout -->
</Expand>
</Type>
</AutoVisualizer>