You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

295 lines
7.1 KiB

  1. ; ***************************************************************
  2. ; * Eigen Visualizer
  3. ; *
  4. ; * Author: Hauke Heibel <hauke.heibel@gmail.com>
  5. ; *
  6. ; * Support the enhanced debugging of the following Eigen
  7. ; * types (*: any, +:fixed dimension) :
  8. ; *
  9. ; * - Eigen::Matrix<*,4,1,*,*,*> and Eigen::Matrix<*,1,4,*,*,*>
  10. ; * - Eigen::Matrix<*,3,1,*,*,*> and Eigen::Matrix<*,1,3,*,*,*>
  11. ; * - Eigen::Matrix<*,2,1,*,*,*> and Eigen::Matrix<*,1,2,*,*,*>
  12. ; * - Eigen::Matrix<*,-1,-1,*,*,*>
  13. ; * - Eigen::Matrix<*,+,-1,*,*,*>
  14. ; * - Eigen::Matrix<*,-1,+,*,*,*>
  15. ; * - Eigen::Matrix<*,+,+,*,*,*>
  16. ; *
  17. ; * Matrices are displayed properly independantly of the memory
  18. ; * alignment (RowMajor vs. ColMajor).
  19. ; *
  20. ; * This file is distributed WITHOUT ANY WARRANTY. Please ensure
  21. ; * that your original autoexp.dat file is copied to a safe
  22. ; * place before proceeding with its modification.
  23. ; ***************************************************************
  24. [Visualizer]
  25. ; Fixed size 4-vectors
  26. Eigen::Matrix<*,4,1,*,*,*>|Eigen::Matrix<*,1,4,*,*,*>{
  27. children
  28. (
  29. #(
  30. [internals]: [$c,!],
  31. x : ($c.m_storage.m_data.array)[0],
  32. y : ($c.m_storage.m_data.array)[1],
  33. z : ($c.m_storage.m_data.array)[2],
  34. w : ($c.m_storage.m_data.array)[3]
  35. )
  36. )
  37. preview
  38. (
  39. #(
  40. "[",
  41. 4,
  42. "](",
  43. #array(expr: $e.m_storage.m_data.array[$i], size: 4),
  44. ")"
  45. )
  46. )
  47. }
  48. ; Fixed size 3-vectors
  49. Eigen::Matrix<*,3,1,*,*,*>|Eigen::Matrix<*,1,3,*,*,*>{
  50. children
  51. (
  52. #(
  53. [internals]: [$c,!],
  54. x : ($c.m_storage.m_data.array)[0],
  55. y : ($c.m_storage.m_data.array)[1],
  56. z : ($c.m_storage.m_data.array)[2]
  57. )
  58. )
  59. preview
  60. (
  61. #(
  62. "[",
  63. 3,
  64. "](",
  65. #array(expr: $e.m_storage.m_data.array[$i], size: 3),
  66. ")"
  67. )
  68. )
  69. }
  70. ; Fixed size 2-vectors
  71. Eigen::Matrix<*,2,1,*,*,*>|Eigen::Matrix<*,1,2,*,*,*>{
  72. children
  73. (
  74. #(
  75. [internals]: [$c,!],
  76. x : ($c.m_storage.m_data.array)[0],
  77. y : ($c.m_storage.m_data.array)[1]
  78. )
  79. )
  80. preview
  81. (
  82. #(
  83. "[",
  84. 2,
  85. "](",
  86. #array(expr: $e.m_storage.m_data.array[$i], size: 2),
  87. ")"
  88. )
  89. )
  90. }
  91. ; Fixed size 1-vectors
  92. Eigen::Matrix<*,1,1,*,*,*>|Eigen::Matrix<*,1,1,*,*,*>{
  93. children
  94. (
  95. #(
  96. [internals]: [$c,!],
  97. x : ($c.m_storage.m_data.array)[0]
  98. )
  99. )
  100. preview
  101. (
  102. #(
  103. "[",
  104. 1,
  105. "](",
  106. #array(expr: $e.m_storage.m_data.array[$i], size: 1),
  107. ")"
  108. )
  109. )
  110. }
  111. ; Dynamic matrices (ColMajor and RowMajor support)
  112. Eigen::Matrix<*,-1,-1,*,*,*>{
  113. children
  114. (
  115. #(
  116. [internals]: [$c,!],
  117. rows: $c.m_storage.m_rows,
  118. cols: $c.m_storage.m_cols,
  119. ; Check for RowMajorBit
  120. #if ($c.Flags & 0x1) (
  121. #array(
  122. rank: 2,
  123. base: 0,
  124. expr: ($c.m_storage.m_data)[($i % $c.m_storage.m_rows)*$c.m_storage.m_cols + (($i- $i % $c.m_storage.m_rows)/$c.m_storage.m_rows)],
  125. size: ($r==1)*$c.m_storage.m_rows+($r==0)*$c.m_storage.m_cols
  126. )
  127. ) #else (
  128. #array(
  129. rank: 2,
  130. base: 0,
  131. expr: ($c.m_storage.m_data)[$i],
  132. size: ($r==1)*$c.m_storage.m_rows+($r==0)*$c.m_storage.m_cols
  133. )
  134. )
  135. )
  136. )
  137. preview
  138. (
  139. #(
  140. "[",
  141. $c.m_storage.m_rows,
  142. ",",
  143. $c.m_storage.m_cols,
  144. "](",
  145. #array(
  146. expr : [($c.m_storage.m_data)[$i],g],
  147. size : $c.m_storage.m_rows*$c.m_storage.m_cols
  148. ),
  149. ")"
  150. )
  151. )
  152. }
  153. ; Fixed rows, dynamic columns matrix (ColMajor and RowMajor support)
  154. Eigen::Matrix<*,*,-1,*,*,*>{
  155. children
  156. (
  157. #(
  158. [internals]: [$c,!],
  159. rows: $c.RowsAtCompileTime,
  160. cols: $c.m_storage.m_cols,
  161. ; Check for RowMajorBit
  162. #if ($c.Flags & 0x1) (
  163. #array(
  164. rank: 2,
  165. base: 0,
  166. expr: ($c.m_storage.m_data)[($i % $c.RowsAtCompileTime)*$c.m_storage.m_cols + (($i- $i % $c.RowsAtCompileTime)/$c.RowsAtCompileTime)],
  167. size: ($r==1)*$c.RowsAtCompileTime+($r==0)*$c.m_storage.m_cols
  168. )
  169. ) #else (
  170. #array(
  171. rank: 2,
  172. base: 0,
  173. expr: ($c.m_storage.m_data)[$i],
  174. size: ($r==1)*$c.RowsAtCompileTime+($r==0)*$c.m_storage.m_cols
  175. )
  176. )
  177. )
  178. )
  179. preview
  180. (
  181. #(
  182. "[",
  183. $c.RowsAtCompileTime,
  184. ",",
  185. $c.m_storage.m_cols,
  186. "](",
  187. #array(
  188. expr : [($c.m_storage.m_data)[$i],g],
  189. size : $c.RowsAtCompileTime*$c.m_storage.m_cols
  190. ),
  191. ")"
  192. )
  193. )
  194. }
  195. ; Dynamic rows, fixed columns matrix (ColMajor and RowMajor support)
  196. Eigen::Matrix<*,-1,*,*,*,*>{
  197. children
  198. (
  199. #(
  200. [internals]: [$c,!],
  201. rows: $c.m_storage.m_rows,
  202. cols: $c.ColsAtCompileTime,
  203. ; Check for RowMajorBit
  204. #if ($c.Flags & 0x1) (
  205. #array(
  206. rank: 2,
  207. base: 0,
  208. expr: ($c.m_storage.m_data)[($i % $c.m_storage.m_rows)*$c.ColsAtCompileTime + (($i- $i % $c.m_storage.m_rows)/$c.m_storage.m_rows)],
  209. size: ($r==1)*$c.m_storage.m_rows+($r==0)*$c.ColsAtCompileTime
  210. )
  211. ) #else (
  212. #array(
  213. rank: 2,
  214. base: 0,
  215. expr: ($c.m_storage.m_data)[$i],
  216. size: ($r==1)*$c.m_storage.m_rows+($r==0)*$c.ColsAtCompileTime
  217. )
  218. )
  219. )
  220. )
  221. preview
  222. (
  223. #(
  224. "[",
  225. $c.m_storage.m_rows,
  226. ",",
  227. $c.ColsAtCompileTime,
  228. "](",
  229. #array(
  230. expr : [($c.m_storage.m_data)[$i],g],
  231. size : $c.m_storage.m_rows*$c.ColsAtCompileTime
  232. ),
  233. ")"
  234. )
  235. )
  236. }
  237. ; Fixed size matrix (ColMajor and RowMajor support)
  238. Eigen::Matrix<*,*,*,*,*,*>{
  239. children
  240. (
  241. #(
  242. [internals]: [$c,!],
  243. rows: $c.RowsAtCompileTime,
  244. cols: $c.ColsAtCompileTime,
  245. ; Check for RowMajorBit
  246. #if ($c.Flags & 0x1) (
  247. #array(
  248. rank: 2,
  249. base: 0,
  250. expr: ($c.m_storage.m_data.array)[($i % $c.RowsAtCompileTime)*$c.ColsAtCompileTime + (($i- $i % $c.RowsAtCompileTime)/$c.RowsAtCompileTime)],
  251. size: ($r==1)*$c.RowsAtCompileTime+($r==0)*$c.ColsAtCompileTime
  252. )
  253. ) #else (
  254. #array(
  255. rank: 2,
  256. base: 0,
  257. expr: ($c.m_storage.m_data.array)[$i],
  258. size: ($r==1)*$c.RowsAtCompileTime+($r==0)*$c.ColsAtCompileTime
  259. )
  260. )
  261. )
  262. )
  263. preview
  264. (
  265. #(
  266. "[",
  267. $c.RowsAtCompileTime,
  268. ",",
  269. $c.ColsAtCompileTime,
  270. "](",
  271. #array(
  272. expr : [($c.m_storage.m_data.array)[$i],g],
  273. size : $c.RowsAtCompileTime*$c.ColsAtCompileTime
  274. ),
  275. ")"
  276. )
  277. )
  278. }