| 1 | <?xml version='1.0' encoding='UTF-8' standalone='no'?> |
|---|
| 2 | <doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.5.6"> |
|---|
| 3 | <compounddef id="matrix_8cpp" kind="file"> |
|---|
| 4 | <compoundname>matrix.cpp</compoundname> |
|---|
| 5 | <includes refid="matrix_8h" local="yes">matrix.h</includes> |
|---|
| 6 | <incdepgraph> |
|---|
| 7 | <node id="757"> |
|---|
| 8 | <label>work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp</label> |
|---|
| 9 | <link refid="matrix.cpp"/> |
|---|
| 10 | <childnode refid="758" relation="include"> |
|---|
| 11 | </childnode> |
|---|
| 12 | </node> |
|---|
| 13 | <node id="758"> |
|---|
| 14 | <label>matrix.h</label> |
|---|
| 15 | <link refid="matrix_8h-source"/> |
|---|
| 16 | </node> |
|---|
| 17 | </incdepgraph> |
|---|
| 18 | <sectiondef kind="func"> |
|---|
| 19 | <memberdef kind="function" id="matrix_8cpp_1dc97517fcf76dba18a7b7eadbf485783" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 20 | <type>void</type> |
|---|
| 21 | <definition>void madd</definition> |
|---|
| 22 | <argsstring>(int *m1, int *m2, int *result, unsigned int rows, unsigned int columns)</argsstring> |
|---|
| 23 | <name>madd</name> |
|---|
| 24 | <param> |
|---|
| 25 | <type>int *</type> |
|---|
| 26 | <declname>m1</declname> |
|---|
| 27 | </param> |
|---|
| 28 | <param> |
|---|
| 29 | <type>int *</type> |
|---|
| 30 | <declname>m2</declname> |
|---|
| 31 | </param> |
|---|
| 32 | <param> |
|---|
| 33 | <type>int *</type> |
|---|
| 34 | <declname>result</declname> |
|---|
| 35 | </param> |
|---|
| 36 | <param> |
|---|
| 37 | <type>unsigned int</type> |
|---|
| 38 | <declname>rows</declname> |
|---|
| 39 | </param> |
|---|
| 40 | <param> |
|---|
| 41 | <type>unsigned int</type> |
|---|
| 42 | <declname>columns</declname> |
|---|
| 43 | </param> |
|---|
| 44 | <briefdescription> |
|---|
| 45 | </briefdescription> |
|---|
| 46 | <detaileddescription> |
|---|
| 47 | </detaileddescription> |
|---|
| 48 | <inbodydescription> |
|---|
| 49 | </inbodydescription> |
|---|
| 50 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="18" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="79" bodyend="86"/> |
|---|
| 51 | </memberdef> |
|---|
| 52 | <memberdef kind="function" id="matrix_8cpp_1eb7b1130cdfdad80c1f6ff08bdabcd9e" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 53 | <type>void</type> |
|---|
| 54 | <definition>void maddD</definition> |
|---|
| 55 | <argsstring>(int *m1, int *m2, unsigned int minrowcol, unsigned int columns)</argsstring> |
|---|
| 56 | <name>maddD</name> |
|---|
| 57 | <param> |
|---|
| 58 | <type>int *</type> |
|---|
| 59 | <declname>m1</declname> |
|---|
| 60 | </param> |
|---|
| 61 | <param> |
|---|
| 62 | <type>int *</type> |
|---|
| 63 | <declname>m2</declname> |
|---|
| 64 | </param> |
|---|
| 65 | <param> |
|---|
| 66 | <type>unsigned int</type> |
|---|
| 67 | <declname>minrowcol</declname> |
|---|
| 68 | </param> |
|---|
| 69 | <param> |
|---|
| 70 | <type>unsigned int</type> |
|---|
| 71 | <declname>columns</declname> |
|---|
| 72 | </param> |
|---|
| 73 | <briefdescription> |
|---|
| 74 | </briefdescription> |
|---|
| 75 | <detaileddescription> |
|---|
| 76 | </detaileddescription> |
|---|
| 77 | <inbodydescription> |
|---|
| 78 | </inbodydescription> |
|---|
| 79 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="21" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="90" bodyend="102"/> |
|---|
| 80 | </memberdef> |
|---|
| 81 | <memberdef kind="function" id="matrix_8cpp_1fc147fb81a107ed3d11edce11680c73b" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 82 | <type>void</type> |
|---|
| 83 | <definition>void msub</definition> |
|---|
| 84 | <argsstring>(int *m1, int *m2, int *result, unsigned int rows, unsigned int columns)</argsstring> |
|---|
| 85 | <name>msub</name> |
|---|
| 86 | <param> |
|---|
| 87 | <type>int *</type> |
|---|
| 88 | <declname>m1</declname> |
|---|
| 89 | </param> |
|---|
| 90 | <param> |
|---|
| 91 | <type>int *</type> |
|---|
| 92 | <declname>m2</declname> |
|---|
| 93 | </param> |
|---|
| 94 | <param> |
|---|
| 95 | <type>int *</type> |
|---|
| 96 | <declname>result</declname> |
|---|
| 97 | </param> |
|---|
| 98 | <param> |
|---|
| 99 | <type>unsigned int</type> |
|---|
| 100 | <declname>rows</declname> |
|---|
| 101 | </param> |
|---|
| 102 | <param> |
|---|
| 103 | <type>unsigned int</type> |
|---|
| 104 | <declname>columns</declname> |
|---|
| 105 | </param> |
|---|
| 106 | <briefdescription> |
|---|
| 107 | </briefdescription> |
|---|
| 108 | <detaileddescription> |
|---|
| 109 | </detaileddescription> |
|---|
| 110 | <inbodydescription> |
|---|
| 111 | </inbodydescription> |
|---|
| 112 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="24" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="105" bodyend="112"/> |
|---|
| 113 | </memberdef> |
|---|
| 114 | <memberdef kind="function" id="matrix_8cpp_10dd80217f9ca5906058c49a7383a4498" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 115 | <type>void</type> |
|---|
| 116 | <definition>void mmult</definition> |
|---|
| 117 | <argsstring>(int *m1, int *m2, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns)</argsstring> |
|---|
| 118 | <name>mmult</name> |
|---|
| 119 | <param> |
|---|
| 120 | <type>int *</type> |
|---|
| 121 | <declname>m1</declname> |
|---|
| 122 | </param> |
|---|
| 123 | <param> |
|---|
| 124 | <type>int *</type> |
|---|
| 125 | <declname>m2</declname> |
|---|
| 126 | </param> |
|---|
| 127 | <param> |
|---|
| 128 | <type>int *</type> |
|---|
| 129 | <declname>result</declname> |
|---|
| 130 | </param> |
|---|
| 131 | <param> |
|---|
| 132 | <type>unsigned int</type> |
|---|
| 133 | <declname>rows</declname> |
|---|
| 134 | </param> |
|---|
| 135 | <param> |
|---|
| 136 | <type>unsigned int</type> |
|---|
| 137 | <declname>columnsx</declname> |
|---|
| 138 | </param> |
|---|
| 139 | <param> |
|---|
| 140 | <type>unsigned int</type> |
|---|
| 141 | <declname>columns</declname> |
|---|
| 142 | </param> |
|---|
| 143 | <briefdescription> |
|---|
| 144 | </briefdescription> |
|---|
| 145 | <detaileddescription> |
|---|
| 146 | </detaileddescription> |
|---|
| 147 | <inbodydescription> |
|---|
| 148 | </inbodydescription> |
|---|
| 149 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="28" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="116" bodyend="147"/> |
|---|
| 150 | </memberdef> |
|---|
| 151 | <memberdef kind="function" id="matrix_8cpp_1aad8e0b5c84bc2ef9c3442d7904493b7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 152 | <type>void</type> |
|---|
| 153 | <definition>void mmultt</definition> |
|---|
| 154 | <argsstring>(int *m1, int *m2, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns)</argsstring> |
|---|
| 155 | <name>mmultt</name> |
|---|
| 156 | <param> |
|---|
| 157 | <type>int *</type> |
|---|
| 158 | <declname>m1</declname> |
|---|
| 159 | </param> |
|---|
| 160 | <param> |
|---|
| 161 | <type>int *</type> |
|---|
| 162 | <declname>m2</declname> |
|---|
| 163 | </param> |
|---|
| 164 | <param> |
|---|
| 165 | <type>int *</type> |
|---|
| 166 | <declname>result</declname> |
|---|
| 167 | </param> |
|---|
| 168 | <param> |
|---|
| 169 | <type>unsigned int</type> |
|---|
| 170 | <declname>rows</declname> |
|---|
| 171 | </param> |
|---|
| 172 | <param> |
|---|
| 173 | <type>unsigned int</type> |
|---|
| 174 | <declname>columnsx</declname> |
|---|
| 175 | </param> |
|---|
| 176 | <param> |
|---|
| 177 | <type>unsigned int</type> |
|---|
| 178 | <declname>columns</declname> |
|---|
| 179 | </param> |
|---|
| 180 | <briefdescription> |
|---|
| 181 | </briefdescription> |
|---|
| 182 | <detaileddescription> |
|---|
| 183 | </detaileddescription> |
|---|
| 184 | <inbodydescription> |
|---|
| 185 | </inbodydescription> |
|---|
| 186 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="32" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="151" bodyend="178"/> |
|---|
| 187 | </memberdef> |
|---|
| 188 | <memberdef kind="function" id="matrix_8cpp_180321ddd04c2295a7898aaac3e1f7ca7" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 189 | <type>void</type> |
|---|
| 190 | <definition>void mmult15</definition> |
|---|
| 191 | <argsstring>(int *m1, int *m2, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns)</argsstring> |
|---|
| 192 | <name>mmult15</name> |
|---|
| 193 | <param> |
|---|
| 194 | <type>int *</type> |
|---|
| 195 | <declname>m1</declname> |
|---|
| 196 | </param> |
|---|
| 197 | <param> |
|---|
| 198 | <type>int *</type> |
|---|
| 199 | <declname>m2</declname> |
|---|
| 200 | </param> |
|---|
| 201 | <param> |
|---|
| 202 | <type>int *</type> |
|---|
| 203 | <declname>result</declname> |
|---|
| 204 | </param> |
|---|
| 205 | <param> |
|---|
| 206 | <type>unsigned int</type> |
|---|
| 207 | <declname>rows</declname> |
|---|
| 208 | </param> |
|---|
| 209 | <param> |
|---|
| 210 | <type>unsigned int</type> |
|---|
| 211 | <declname>columnsx</declname> |
|---|
| 212 | </param> |
|---|
| 213 | <param> |
|---|
| 214 | <type>unsigned int</type> |
|---|
| 215 | <declname>columns</declname> |
|---|
| 216 | </param> |
|---|
| 217 | <briefdescription> |
|---|
| 218 | </briefdescription> |
|---|
| 219 | <detaileddescription> |
|---|
| 220 | </detaileddescription> |
|---|
| 221 | <inbodydescription> |
|---|
| 222 | </inbodydescription> |
|---|
| 223 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="36" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="182" bodyend="212"/> |
|---|
| 224 | </memberdef> |
|---|
| 225 | <memberdef kind="function" id="matrix_8cpp_17b21ce82e50b9491450fbe8f0ba45830" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 226 | <type>void</type> |
|---|
| 227 | <definition>void mmultt15</definition> |
|---|
| 228 | <argsstring>(int *m1, int *m2, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns)</argsstring> |
|---|
| 229 | <name>mmultt15</name> |
|---|
| 230 | <param> |
|---|
| 231 | <type>int *</type> |
|---|
| 232 | <declname>m1</declname> |
|---|
| 233 | </param> |
|---|
| 234 | <param> |
|---|
| 235 | <type>int *</type> |
|---|
| 236 | <declname>m2</declname> |
|---|
| 237 | </param> |
|---|
| 238 | <param> |
|---|
| 239 | <type>int *</type> |
|---|
| 240 | <declname>result</declname> |
|---|
| 241 | </param> |
|---|
| 242 | <param> |
|---|
| 243 | <type>unsigned int</type> |
|---|
| 244 | <declname>rows</declname> |
|---|
| 245 | </param> |
|---|
| 246 | <param> |
|---|
| 247 | <type>unsigned int</type> |
|---|
| 248 | <declname>columnsx</declname> |
|---|
| 249 | </param> |
|---|
| 250 | <param> |
|---|
| 251 | <type>unsigned int</type> |
|---|
| 252 | <declname>columns</declname> |
|---|
| 253 | </param> |
|---|
| 254 | <briefdescription> |
|---|
| 255 | </briefdescription> |
|---|
| 256 | <detaileddescription> |
|---|
| 257 | </detaileddescription> |
|---|
| 258 | <inbodydescription> |
|---|
| 259 | </inbodydescription> |
|---|
| 260 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="41" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="216" bodyend="242"/> |
|---|
| 261 | </memberdef> |
|---|
| 262 | <memberdef kind="function" id="matrix_8cpp_1acfc7e3b42ad50e39b11f11753b749f6" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 263 | <type>void</type> |
|---|
| 264 | <definition>void mmult1530</definition> |
|---|
| 265 | <argsstring>(int *m1, long *m2, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns)</argsstring> |
|---|
| 266 | <name>mmult1530</name> |
|---|
| 267 | <param> |
|---|
| 268 | <type>int *</type> |
|---|
| 269 | <declname>m1</declname> |
|---|
| 270 | </param> |
|---|
| 271 | <param> |
|---|
| 272 | <type>long *</type> |
|---|
| 273 | <declname>m2</declname> |
|---|
| 274 | </param> |
|---|
| 275 | <param> |
|---|
| 276 | <type>int *</type> |
|---|
| 277 | <declname>result</declname> |
|---|
| 278 | </param> |
|---|
| 279 | <param> |
|---|
| 280 | <type>unsigned int</type> |
|---|
| 281 | <declname>rows</declname> |
|---|
| 282 | </param> |
|---|
| 283 | <param> |
|---|
| 284 | <type>unsigned int</type> |
|---|
| 285 | <declname>columnsx</declname> |
|---|
| 286 | </param> |
|---|
| 287 | <param> |
|---|
| 288 | <type>unsigned int</type> |
|---|
| 289 | <declname>columns</declname> |
|---|
| 290 | </param> |
|---|
| 291 | <briefdescription> |
|---|
| 292 | </briefdescription> |
|---|
| 293 | <detaileddescription> |
|---|
| 294 | </detaileddescription> |
|---|
| 295 | <inbodydescription> |
|---|
| 296 | </inbodydescription> |
|---|
| 297 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="46" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="246" bodyend="277"/> |
|---|
| 298 | </memberdef> |
|---|
| 299 | <memberdef kind="function" id="matrix_8cpp_1ff076c1db8aa1be1797eede839441da8" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 300 | <type>void</type> |
|---|
| 301 | <definition>void mmultDl</definition> |
|---|
| 302 | <argsstring>(int *m2, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns, unsigned int minrowcol)</argsstring> |
|---|
| 303 | <name>mmultDl</name> |
|---|
| 304 | <param> |
|---|
| 305 | <type>int *</type> |
|---|
| 306 | <declname>m2</declname> |
|---|
| 307 | </param> |
|---|
| 308 | <param> |
|---|
| 309 | <type>int *</type> |
|---|
| 310 | <declname>result</declname> |
|---|
| 311 | </param> |
|---|
| 312 | <param> |
|---|
| 313 | <type>unsigned int</type> |
|---|
| 314 | <declname>rows</declname> |
|---|
| 315 | </param> |
|---|
| 316 | <param> |
|---|
| 317 | <type>unsigned int</type> |
|---|
| 318 | <declname>columnsx</declname> |
|---|
| 319 | </param> |
|---|
| 320 | <param> |
|---|
| 321 | <type>unsigned int</type> |
|---|
| 322 | <declname>columns</declname> |
|---|
| 323 | </param> |
|---|
| 324 | <param> |
|---|
| 325 | <type>unsigned int</type> |
|---|
| 326 | <declname>minrowcol</declname> |
|---|
| 327 | </param> |
|---|
| 328 | <briefdescription> |
|---|
| 329 | </briefdescription> |
|---|
| 330 | <detaileddescription> |
|---|
| 331 | </detaileddescription> |
|---|
| 332 | <inbodydescription> |
|---|
| 333 | </inbodydescription> |
|---|
| 334 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="51" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="282" bodyend="297"/> |
|---|
| 335 | </memberdef> |
|---|
| 336 | <memberdef kind="function" id="matrix_8cpp_1094cd71f8538a5e9375f0ab2759b688d" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 337 | <type>void</type> |
|---|
| 338 | <definition>void mmultDl15</definition> |
|---|
| 339 | <argsstring>(int *DIAG, int *m2, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns, unsigned int minrowcol)</argsstring> |
|---|
| 340 | <name>mmultDl15</name> |
|---|
| 341 | <param> |
|---|
| 342 | <type>int *</type> |
|---|
| 343 | <declname>DIAG</declname> |
|---|
| 344 | </param> |
|---|
| 345 | <param> |
|---|
| 346 | <type>int *</type> |
|---|
| 347 | <declname>m2</declname> |
|---|
| 348 | </param> |
|---|
| 349 | <param> |
|---|
| 350 | <type>int *</type> |
|---|
| 351 | <declname>result</declname> |
|---|
| 352 | </param> |
|---|
| 353 | <param> |
|---|
| 354 | <type>unsigned int</type> |
|---|
| 355 | <declname>rows</declname> |
|---|
| 356 | </param> |
|---|
| 357 | <param> |
|---|
| 358 | <type>unsigned int</type> |
|---|
| 359 | <declname>columnsx</declname> |
|---|
| 360 | </param> |
|---|
| 361 | <param> |
|---|
| 362 | <type>unsigned int</type> |
|---|
| 363 | <declname>columns</declname> |
|---|
| 364 | </param> |
|---|
| 365 | <param> |
|---|
| 366 | <type>unsigned int</type> |
|---|
| 367 | <declname>minrowcol</declname> |
|---|
| 368 | </param> |
|---|
| 369 | <briefdescription> |
|---|
| 370 | </briefdescription> |
|---|
| 371 | <detaileddescription> |
|---|
| 372 | </detaileddescription> |
|---|
| 373 | <inbodydescription> |
|---|
| 374 | </inbodydescription> |
|---|
| 375 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="56" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="302" bodyend="321"/> |
|---|
| 376 | </memberdef> |
|---|
| 377 | <memberdef kind="function" id="matrix_8cpp_1ececc21a99cfdc6238b5fbe1a0e61bb4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 378 | <type>void</type> |
|---|
| 379 | <definition>void mmultDr</definition> |
|---|
| 380 | <argsstring>(int *m1, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns, unsigned int minrowcol)</argsstring> |
|---|
| 381 | <name>mmultDr</name> |
|---|
| 382 | <param> |
|---|
| 383 | <type>int *</type> |
|---|
| 384 | <declname>m1</declname> |
|---|
| 385 | </param> |
|---|
| 386 | <param> |
|---|
| 387 | <type>int *</type> |
|---|
| 388 | <declname>result</declname> |
|---|
| 389 | </param> |
|---|
| 390 | <param> |
|---|
| 391 | <type>unsigned int</type> |
|---|
| 392 | <declname>rows</declname> |
|---|
| 393 | </param> |
|---|
| 394 | <param> |
|---|
| 395 | <type>unsigned int</type> |
|---|
| 396 | <declname>columnsx</declname> |
|---|
| 397 | </param> |
|---|
| 398 | <param> |
|---|
| 399 | <type>unsigned int</type> |
|---|
| 400 | <declname>columns</declname> |
|---|
| 401 | </param> |
|---|
| 402 | <param> |
|---|
| 403 | <type>unsigned int</type> |
|---|
| 404 | <declname>minrowcol</declname> |
|---|
| 405 | </param> |
|---|
| 406 | <briefdescription> |
|---|
| 407 | </briefdescription> |
|---|
| 408 | <detaileddescription> |
|---|
| 409 | </detaileddescription> |
|---|
| 410 | <inbodydescription> |
|---|
| 411 | </inbodydescription> |
|---|
| 412 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="61" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="326" bodyend="346"/> |
|---|
| 413 | </memberdef> |
|---|
| 414 | <memberdef kind="function" id="matrix_8cpp_1001bd19384a1c2f9fb3450c4f3476fa4" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 415 | <type>void</type> |
|---|
| 416 | <definition>void mmultDr15</definition> |
|---|
| 417 | <argsstring>(int *m1, int *DIAG, int *result, unsigned int rows, unsigned int columnsx, unsigned int columns, unsigned int minrowcol)</argsstring> |
|---|
| 418 | <name>mmultDr15</name> |
|---|
| 419 | <param> |
|---|
| 420 | <type>int *</type> |
|---|
| 421 | <declname>m1</declname> |
|---|
| 422 | </param> |
|---|
| 423 | <param> |
|---|
| 424 | <type>int *</type> |
|---|
| 425 | <declname>DIAG</declname> |
|---|
| 426 | </param> |
|---|
| 427 | <param> |
|---|
| 428 | <type>int *</type> |
|---|
| 429 | <declname>result</declname> |
|---|
| 430 | </param> |
|---|
| 431 | <param> |
|---|
| 432 | <type>unsigned int</type> |
|---|
| 433 | <declname>rows</declname> |
|---|
| 434 | </param> |
|---|
| 435 | <param> |
|---|
| 436 | <type>unsigned int</type> |
|---|
| 437 | <declname>columnsx</declname> |
|---|
| 438 | </param> |
|---|
| 439 | <param> |
|---|
| 440 | <type>unsigned int</type> |
|---|
| 441 | <declname>columns</declname> |
|---|
| 442 | </param> |
|---|
| 443 | <param> |
|---|
| 444 | <type>unsigned int</type> |
|---|
| 445 | <declname>minrowcol</declname> |
|---|
| 446 | </param> |
|---|
| 447 | <briefdescription> |
|---|
| 448 | </briefdescription> |
|---|
| 449 | <detaileddescription> |
|---|
| 450 | </detaileddescription> |
|---|
| 451 | <inbodydescription> |
|---|
| 452 | </inbodydescription> |
|---|
| 453 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="66" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="352" bodyend="377"/> |
|---|
| 454 | </memberdef> |
|---|
| 455 | <memberdef kind="function" id="matrix_8cpp_10803daba60892817dd95383f10e2b501" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 456 | <type>void</type> |
|---|
| 457 | <definition>void mtrans</definition> |
|---|
| 458 | <argsstring>(int *m1, int *result, unsigned int rows, unsigned int columns)</argsstring> |
|---|
| 459 | <name>mtrans</name> |
|---|
| 460 | <param> |
|---|
| 461 | <type>int *</type> |
|---|
| 462 | <declname>m1</declname> |
|---|
| 463 | </param> |
|---|
| 464 | <param> |
|---|
| 465 | <type>int *</type> |
|---|
| 466 | <declname>result</declname> |
|---|
| 467 | </param> |
|---|
| 468 | <param> |
|---|
| 469 | <type>unsigned int</type> |
|---|
| 470 | <declname>rows</declname> |
|---|
| 471 | </param> |
|---|
| 472 | <param> |
|---|
| 473 | <type>unsigned int</type> |
|---|
| 474 | <declname>columns</declname> |
|---|
| 475 | </param> |
|---|
| 476 | <briefdescription> |
|---|
| 477 | </briefdescription> |
|---|
| 478 | <detaileddescription> |
|---|
| 479 | </detaileddescription> |
|---|
| 480 | <inbodydescription> |
|---|
| 481 | </inbodydescription> |
|---|
| 482 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="69" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="381" bodyend="388"/> |
|---|
| 483 | </memberdef> |
|---|
| 484 | <memberdef kind="function" id="matrix_8cpp_16281b33c494f55a0e1f56cc6ec226728" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 485 | <type>void</type> |
|---|
| 486 | <definition>void minv2</definition> |
|---|
| 487 | <argsstring>(int *matrix, long *result)</argsstring> |
|---|
| 488 | <name>minv2</name> |
|---|
| 489 | <param> |
|---|
| 490 | <type>int *</type> |
|---|
| 491 | <declname>matrix</declname> |
|---|
| 492 | </param> |
|---|
| 493 | <param> |
|---|
| 494 | <type>long *</type> |
|---|
| 495 | <declname>result</declname> |
|---|
| 496 | </param> |
|---|
| 497 | <briefdescription> |
|---|
| 498 | </briefdescription> |
|---|
| 499 | <detaileddescription> |
|---|
| 500 | </detaileddescription> |
|---|
| 501 | <inbodydescription> |
|---|
| 502 | </inbodydescription> |
|---|
| 503 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="72" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="391" bodyend="403"/> |
|---|
| 504 | </memberdef> |
|---|
| 505 | <memberdef kind="function" id="matrix_8cpp_14cf0ac2cd86f2dfd9c984ae7599bad65" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 506 | <type>void</type> |
|---|
| 507 | <definition>void choice_P</definition> |
|---|
| 508 | <argsstring>(int *m, int *result, unsigned int columns)</argsstring> |
|---|
| 509 | <name>choice_P</name> |
|---|
| 510 | <param> |
|---|
| 511 | <type>int *</type> |
|---|
| 512 | <declname>m</declname> |
|---|
| 513 | </param> |
|---|
| 514 | <param> |
|---|
| 515 | <type>int *</type> |
|---|
| 516 | <declname>result</declname> |
|---|
| 517 | </param> |
|---|
| 518 | <param> |
|---|
| 519 | <type>unsigned int</type> |
|---|
| 520 | <declname>columns</declname> |
|---|
| 521 | </param> |
|---|
| 522 | <briefdescription> |
|---|
| 523 | </briefdescription> |
|---|
| 524 | <detaileddescription> |
|---|
| 525 | </detaileddescription> |
|---|
| 526 | <inbodydescription> |
|---|
| 527 | </inbodydescription> |
|---|
| 528 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="74" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="406" bodyend="412"/> |
|---|
| 529 | </memberdef> |
|---|
| 530 | <memberdef kind="function" id="matrix_8cpp_117f6067daa5a602765f81590b8c69189" prot="public" static="no" const="no" explicit="no" inline="no" virt="non-virtual"> |
|---|
| 531 | <type>void</type> |
|---|
| 532 | <definition>void choice_x</definition> |
|---|
| 533 | <argsstring>(int *m, int *result)</argsstring> |
|---|
| 534 | <name>choice_x</name> |
|---|
| 535 | <param> |
|---|
| 536 | <type>int *</type> |
|---|
| 537 | <declname>m</declname> |
|---|
| 538 | </param> |
|---|
| 539 | <param> |
|---|
| 540 | <type>int *</type> |
|---|
| 541 | <declname>result</declname> |
|---|
| 542 | </param> |
|---|
| 543 | <briefdescription> |
|---|
| 544 | </briefdescription> |
|---|
| 545 | <detaileddescription> |
|---|
| 546 | </detaileddescription> |
|---|
| 547 | <inbodydescription> |
|---|
| 548 | </inbodydescription> |
|---|
| 549 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" line="75" bodyfile="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp" bodystart="415" bodyend="419"/> |
|---|
| 550 | </memberdef> |
|---|
| 551 | </sectiondef> |
|---|
| 552 | <briefdescription> |
|---|
| 553 | </briefdescription> |
|---|
| 554 | <detaileddescription> |
|---|
| 555 | </detaileddescription> |
|---|
| 556 | <programlisting> |
|---|
| 557 | <codeline lineno="1"><highlight class="comment">/************************************</highlight></codeline> |
|---|
| 558 | <codeline lineno="2"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Extended<sp/>Kalman<sp/>Filter</highlight></codeline> |
|---|
| 559 | <codeline lineno="3"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Matrix<sp/>operations</highlight></codeline> |
|---|
| 560 | <codeline lineno="4"><highlight class="comment"></highlight></codeline> |
|---|
| 561 | <codeline lineno="5"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>Z.<sp/>Peroutka</highlight></codeline> |
|---|
| 562 | <codeline lineno="6"><highlight class="comment"></highlight></codeline> |
|---|
| 563 | <codeline lineno="7"><highlight class="comment">Rev.<sp/>15.3.2008</highlight></codeline> |
|---|
| 564 | <codeline lineno="8"><highlight class="comment"></highlight></codeline> |
|---|
| 565 | <codeline lineno="9"><highlight class="comment">15.3.<sp/>2008<sp/><sp/><sp/><sp/><sp/><sp/>Kompletni<sp/>kontrola<sp/>vypoctu<sp/>+<sp/>zamena<sp/>q15->int<sp/>a<sp/>q30->long</highlight></codeline> |
|---|
| 566 | <codeline lineno="10"><highlight class="comment"></highlight></codeline> |
|---|
| 567 | <codeline lineno="11"><highlight class="comment">*************************************/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 568 | <codeline lineno="12"><highlight class="normal"></highlight></codeline> |
|---|
| 569 | <codeline lineno="13"><highlight class="normal"></highlight><highlight class="preprocessor">#include<sp/>"matrix.h"</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 570 | <codeline lineno="14"><highlight class="normal"></highlight></codeline> |
|---|
| 571 | <codeline lineno="15"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Vsechny<sp/>meze<sp/>se<sp/>udavaji<sp/>ve<sp/>tvaru<sp/>(rozmer_matice<sp/>-<sp/>1),<sp/>abych<sp/>mel<sp/>ve<sp/>FOR<sp/>konstantni<sp/>horni<sp/>mez)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 572 | <codeline lineno="16"><highlight class="normal"></highlight></codeline> |
|---|
| 573 | <codeline lineno="17"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>addition<sp/>in<sp/>q15:<sp/>m1<sp/>+<sp/>m2<sp/>=<sp/>result[rows,<sp/>columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 574 | <codeline lineno="18"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>madd(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns);</highlight></codeline> |
|---|
| 575 | <codeline lineno="19"><highlight class="normal"></highlight></codeline> |
|---|
| 576 | <codeline lineno="20"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>add<sp/>diagonal<sp/>matrix<sp/>m2<sp/>to<sp/>matrix<sp/>m1<sp/>-<sp/>both<sp/>in<sp/>format<sp/>q15,<sp/>minrowcol<sp/>=<sp/>min(rows,<sp/>columns)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 577 | <codeline lineno="21"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>maddD(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns);</highlight></codeline> |
|---|
| 578 | <codeline lineno="22"><highlight class="normal"></highlight></codeline> |
|---|
| 579 | <codeline lineno="23"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>substraction<sp/>in<sp/>q15:<sp/>m1<sp/>-<sp/>m2<sp/>=<sp/>result[rows,<sp/>columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 580 | <codeline lineno="24"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>msub(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns);</highlight></codeline> |
|---|
| 581 | <codeline lineno="25"><highlight class="normal"></highlight></codeline> |
|---|
| 582 | <codeline lineno="26"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>multiply<sp/>in<sp/>q15:<sp/>m1[rows,columnsx]*m2[columnsx,columns]<sp/>=<sp/>result[rows,columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 583 | <codeline lineno="27"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmult(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 584 | <codeline lineno="28"><highlight class="normal">columns);</highlight></codeline> |
|---|
| 585 | <codeline lineno="29"><highlight class="normal"></highlight></codeline> |
|---|
| 586 | <codeline lineno="30"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>multiplication<sp/>in<sp/>q15:<sp/>m1[rows,columnsx]*(m2[columnsx,columns]transpose)<sp/>=<sp/>result[rows,columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 587 | <codeline lineno="31"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultt(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 588 | <codeline lineno="32"><highlight class="normal">columns);</highlight></codeline> |
|---|
| 589 | <codeline lineno="33"><highlight class="normal"></highlight></codeline> |
|---|
| 590 | <codeline lineno="34"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>matrix<sp/>multiplication<sp/>in<sp/>q15:<sp/>sum<sp/>is<sp/>in<sp/>q15<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 591 | <codeline lineno="35"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmult15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 592 | <codeline lineno="36"><highlight class="normal">columns);</highlight></codeline> |
|---|
| 593 | <codeline lineno="37"><highlight class="normal"></highlight></codeline> |
|---|
| 594 | <codeline lineno="38"><highlight class="normal"></highlight></codeline> |
|---|
| 595 | <codeline lineno="39"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>multiplication<sp/>in<sp/>q15<sp/>(sum<sp/>is<sp/>in<sp/>q15):<sp/>m1[rows,columnsx]*(m2[columns,columnsx]transpose)<sp/>=<sp/>result[rows,columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 596 | <codeline lineno="40"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultt15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 597 | <codeline lineno="41"><highlight class="normal">columns);</highlight></codeline> |
|---|
| 598 | <codeline lineno="42"><highlight class="normal"></highlight></codeline> |
|---|
| 599 | <codeline lineno="43"><highlight class="normal"></highlight></codeline> |
|---|
| 600 | <codeline lineno="44"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>multiplication<sp/>-<sp/>Q15<sp/>*<sp/>Q30<sp/>format<sp/>-><sp/>RESULT<sp/>in<sp/>Q15<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 601 | <codeline lineno="45"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmult1530(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 602 | <codeline lineno="46"><highlight class="normal">columns);</highlight></codeline> |
|---|
| 603 | <codeline lineno="47"><highlight class="normal"></highlight></codeline> |
|---|
| 604 | <codeline lineno="48"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Left<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>ones<sp/>matrix<sp/>in<sp/>q15:<sp/>DIAG[rows,columnsx]*m2[columnsx,columns]<sp/>=<sp/>result[rows,columns]</highlight></codeline> |
|---|
| 605 | <codeline lineno="49"><highlight class="comment">minrowcol=minimum(rows,<sp/>columnsx)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 606 | <codeline lineno="50"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDl(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 607 | <codeline lineno="51"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol);</highlight></codeline> |
|---|
| 608 | <codeline lineno="52"><highlight class="normal"></highlight></codeline> |
|---|
| 609 | <codeline lineno="53"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Left<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>matrix<sp/>in<sp/>q15:<sp/>DIAG[rows,columnsx]*m2[columnsx,columns]<sp/>=<sp/>result[rows,columns]</highlight></codeline> |
|---|
| 610 | <codeline lineno="54"><highlight class="comment">minrowcol=minimum(rows,<sp/>columnsx)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 611 | <codeline lineno="55"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDl15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*DIAG,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 612 | <codeline lineno="56"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol);</highlight></codeline> |
|---|
| 613 | <codeline lineno="57"><highlight class="normal"></highlight></codeline> |
|---|
| 614 | <codeline lineno="58"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Right<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>ones<sp/>matrix<sp/>in<sp/>q15:<sp/>m1[rows,columnsx]*DIAG[columnsx,columns]<sp/>=<sp/>result[rows,columns]</highlight></codeline> |
|---|
| 615 | <codeline lineno="59"><highlight class="comment">minrowcol=minimum(columnsx,columns)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 616 | <codeline lineno="60"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDr(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 617 | <codeline lineno="61"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol);</highlight></codeline> |
|---|
| 618 | <codeline lineno="62"><highlight class="normal"></highlight></codeline> |
|---|
| 619 | <codeline lineno="63"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Right<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>matrix<sp/>in<sp/>q15:<sp/>m1[rows,columnsx]*DIAG[columnsx,columns]<sp/>=<sp/>result[rows,columns]</highlight></codeline> |
|---|
| 620 | <codeline lineno="64"><highlight class="comment">minrowcol=minimum(columnsx,columns)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 621 | <codeline lineno="65"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDr15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*DIAG,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 622 | <codeline lineno="66"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol);</highlight></codeline> |
|---|
| 623 | <codeline lineno="67"><highlight class="normal"></highlight></codeline> |
|---|
| 624 | <codeline lineno="68"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>transposition<sp/>in<sp/>q15:<sp/>m1.'<sp/>=<sp/>result[rows,<sp/>columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 625 | <codeline lineno="69"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mtrans(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns);</highlight></codeline> |
|---|
| 626 | <codeline lineno="70"><highlight class="normal"></highlight></codeline> |
|---|
| 627 | <codeline lineno="71"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>[2,2]<sp/>inversion<sp/>in<sp/>q15:<sp/>inv(m1)<sp/>=<sp/>result[rows,<sp/>columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 628 | <codeline lineno="72"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>minv2(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*matrix,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>*result);</highlight></codeline> |
|---|
| 629 | <codeline lineno="73"><highlight class="normal"></highlight></codeline> |
|---|
| 630 | <codeline lineno="74"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>choice_P(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns);</highlight></codeline> |
|---|
| 631 | <codeline lineno="75"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>choice_x(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result);</highlight></codeline> |
|---|
| 632 | <codeline lineno="76"><highlight class="normal"></highlight></codeline> |
|---|
| 633 | <codeline lineno="77"><highlight class="normal"></highlight></codeline> |
|---|
| 634 | <codeline lineno="78"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>matrix<sp/>addition<sp/>in<sp/>q15<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 635 | <codeline lineno="79"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>madd(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns)</highlight></codeline> |
|---|
| 636 | <codeline lineno="80"><highlight class="normal">{</highlight></codeline> |
|---|
| 637 | <codeline lineno="81"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j;</highlight></codeline> |
|---|
| 638 | <codeline lineno="82"><highlight class="normal"></highlight></codeline> |
|---|
| 639 | <codeline lineno="83"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 640 | <codeline lineno="84"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 641 | <codeline lineno="85"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++<sp/>=<sp/>*m1++<sp/>+<sp/>*m2++;</highlight></codeline> |
|---|
| 642 | <codeline lineno="86"><highlight class="normal">}</highlight></codeline> |
|---|
| 643 | <codeline lineno="87"><highlight class="normal"></highlight></codeline> |
|---|
| 644 | <codeline lineno="88"><highlight class="normal"></highlight></codeline> |
|---|
| 645 | <codeline lineno="89"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>add<sp/>diagonal<sp/>matrix<sp/>m2<sp/>to<sp/>matrix<sp/>m1<sp/>-<sp/>both<sp/>in<sp/>format<sp/>q15,<sp/>minrowcol<sp/>=<sp/>min(rows,<sp/>columns)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 646 | <codeline lineno="90"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>maddD(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns)</highlight></codeline> |
|---|
| 647 | <codeline lineno="91"><highlight class="normal">{</highlight></codeline> |
|---|
| 648 | <codeline lineno="92"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline> |
|---|
| 649 | <codeline lineno="93"><highlight class="normal"></highlight></codeline> |
|---|
| 650 | <codeline lineno="94"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=minrowcol;<sp/>i++)</highlight></codeline> |
|---|
| 651 | <codeline lineno="95"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/><sp/><sp/>*(m1+i*(columns+1)+i)<sp/>+=<sp/>*(m2+i*(columns+1)+i);<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 652 | <codeline lineno="96"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 653 | <codeline lineno="97"><highlight class="normal"><sp/><sp/><sp/><sp/>*m1<sp/>+=<sp/>*m2;</highlight></codeline> |
|---|
| 654 | <codeline lineno="98"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columns+2);</highlight></codeline> |
|---|
| 655 | <codeline lineno="99"><highlight class="normal"><sp/><sp/><sp/><sp/>m2+=(columns+2);</highlight></codeline> |
|---|
| 656 | <codeline lineno="100"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 657 | <codeline lineno="101"><highlight class="normal"></highlight></codeline> |
|---|
| 658 | <codeline lineno="102"><highlight class="normal">}</highlight></codeline> |
|---|
| 659 | <codeline lineno="103"><highlight class="normal"></highlight></codeline> |
|---|
| 660 | <codeline lineno="104"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>substraction<sp/>in<sp/>q15<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 661 | <codeline lineno="105"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>msub(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns)</highlight></codeline> |
|---|
| 662 | <codeline lineno="106"><highlight class="normal">{</highlight></codeline> |
|---|
| 663 | <codeline lineno="107"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j;</highlight></codeline> |
|---|
| 664 | <codeline lineno="108"><highlight class="normal"></highlight></codeline> |
|---|
| 665 | <codeline lineno="109"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 666 | <codeline lineno="110"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 667 | <codeline lineno="111"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++<sp/>=<sp/>*m1++<sp/>-<sp/>*m2++;</highlight></codeline> |
|---|
| 668 | <codeline lineno="112"><highlight class="normal">}</highlight></codeline> |
|---|
| 669 | <codeline lineno="113"><highlight class="normal"></highlight></codeline> |
|---|
| 670 | <codeline lineno="114"><highlight class="normal"></highlight></codeline> |
|---|
| 671 | <codeline lineno="115"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>matrix<sp/>multiplication<sp/>in<sp/>q15<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 672 | <codeline lineno="116"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmult(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 673 | <codeline lineno="117"><highlight class="normal">columns)</highlight></codeline> |
|---|
| 674 | <codeline lineno="118"><highlight class="normal">{</highlight></codeline> |
|---|
| 675 | <codeline lineno="119"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/>j,<sp/>k;</highlight></codeline> |
|---|
| 676 | <codeline lineno="120"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 677 | <codeline lineno="121"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2pom;</highlight></codeline> |
|---|
| 678 | <codeline lineno="122"><highlight class="normal"></highlight></codeline> |
|---|
| 679 | <codeline lineno="123"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 680 | <codeline lineno="124"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 681 | <codeline lineno="125"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 682 | <codeline lineno="126"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 683 | <codeline lineno="127"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m2pom=m2+j;</highlight></codeline> |
|---|
| 684 | <codeline lineno="128"><highlight class="normal"></highlight></codeline> |
|---|
| 685 | <codeline lineno="129"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(k=0;<sp/>k<=columnsx;<sp/>k++)</highlight></codeline> |
|---|
| 686 | <codeline lineno="130"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 687 | <codeline lineno="131"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum+=(long)(*m1++)**m2pom;</highlight></codeline> |
|---|
| 688 | <codeline lineno="132"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>m2pom+=columns+1;</highlight></codeline> |
|---|
| 689 | <codeline lineno="133"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 690 | <codeline lineno="134"><highlight class="normal"></highlight></codeline> |
|---|
| 691 | <codeline lineno="135"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>saturation<sp/>effect</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 692 | <codeline lineno="136"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=tmp_sum>>15;</highlight></codeline> |
|---|
| 693 | <codeline lineno="137"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum>32767)<sp/>tmp_sum=32767;</highlight></codeline> |
|---|
| 694 | <codeline lineno="138"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum<-32768)<sp/>tmp_sum=-32768;</highlight></codeline> |
|---|
| 695 | <codeline lineno="139"><highlight class="normal"></highlight></codeline> |
|---|
| 696 | <codeline lineno="140"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=tmp_sum;</highlight></codeline> |
|---|
| 697 | <codeline lineno="141"><highlight class="normal"></highlight></codeline> |
|---|
| 698 | <codeline lineno="142"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 699 | <codeline lineno="143"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m1-=(columnsx+1);</highlight></codeline> |
|---|
| 700 | <codeline lineno="144"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 701 | <codeline lineno="145"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columnsx+1);</highlight></codeline> |
|---|
| 702 | <codeline lineno="146"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 703 | <codeline lineno="147"><highlight class="normal">}</highlight></codeline> |
|---|
| 704 | <codeline lineno="148"><highlight class="normal"></highlight></codeline> |
|---|
| 705 | <codeline lineno="149"><highlight class="normal"></highlight></codeline> |
|---|
| 706 | <codeline lineno="150"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>multiplication<sp/>in<sp/>q15:<sp/>m1[rows,columnsx]*(m2[columns,columnsx]transpose)<sp/>=<sp/>result[rows,columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 707 | <codeline lineno="151"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultt(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 708 | <codeline lineno="152"><highlight class="normal">columns)</highlight></codeline> |
|---|
| 709 | <codeline lineno="153"><highlight class="normal">{</highlight></codeline> |
|---|
| 710 | <codeline lineno="154"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/>j,<sp/>k;</highlight></codeline> |
|---|
| 711 | <codeline lineno="155"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 712 | <codeline lineno="156"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2pom=m2;</highlight></codeline> |
|---|
| 713 | <codeline lineno="157"><highlight class="normal"></highlight></codeline> |
|---|
| 714 | <codeline lineno="158"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 715 | <codeline lineno="159"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 716 | <codeline lineno="160"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 717 | <codeline lineno="161"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 718 | <codeline lineno="162"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(k=0;<sp/>k<=columnsx;<sp/>k++)</highlight></codeline> |
|---|
| 719 | <codeline lineno="163"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum+=(</highlight><highlight class="keywordtype">long</highlight><highlight class="normal">)(*m1++)*(*m2pom++);</highlight></codeline> |
|---|
| 720 | <codeline lineno="164"><highlight class="normal"></highlight></codeline> |
|---|
| 721 | <codeline lineno="165"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>saturation<sp/>effect</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 722 | <codeline lineno="166"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=tmp_sum>>15;</highlight></codeline> |
|---|
| 723 | <codeline lineno="167"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum>32767)<sp/>tmp_sum=32767;</highlight></codeline> |
|---|
| 724 | <codeline lineno="168"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum<-32768)<sp/>tmp_sum=-32768;</highlight></codeline> |
|---|
| 725 | <codeline lineno="169"><highlight class="normal"></highlight></codeline> |
|---|
| 726 | <codeline lineno="170"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=tmp_sum;</highlight></codeline> |
|---|
| 727 | <codeline lineno="171"><highlight class="normal"></highlight></codeline> |
|---|
| 728 | <codeline lineno="172"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 729 | <codeline lineno="173"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m1-=(columnsx+1);</highlight></codeline> |
|---|
| 730 | <codeline lineno="174"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 731 | <codeline lineno="175"><highlight class="normal"><sp/><sp/><sp/><sp/>m2pom=m2;</highlight></codeline> |
|---|
| 732 | <codeline lineno="176"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columnsx+1);</highlight></codeline> |
|---|
| 733 | <codeline lineno="177"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 734 | <codeline lineno="178"><highlight class="normal">}</highlight></codeline> |
|---|
| 735 | <codeline lineno="179"><highlight class="normal"></highlight></codeline> |
|---|
| 736 | <codeline lineno="180"><highlight class="normal"></highlight></codeline> |
|---|
| 737 | <codeline lineno="181"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>matrix<sp/>multiplication<sp/>in<sp/>q15:<sp/>sum<sp/>is<sp/>in<sp/>q15<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 738 | <codeline lineno="182"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmult15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 739 | <codeline lineno="183"><highlight class="normal">columns)</highlight></codeline> |
|---|
| 740 | <codeline lineno="184"><highlight class="normal">{</highlight></codeline> |
|---|
| 741 | <codeline lineno="185"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/>j,<sp/>k;</highlight></codeline> |
|---|
| 742 | <codeline lineno="186"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 743 | <codeline lineno="187"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2pom;</highlight></codeline> |
|---|
| 744 | <codeline lineno="188"><highlight class="normal"></highlight></codeline> |
|---|
| 745 | <codeline lineno="189"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 746 | <codeline lineno="190"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 747 | <codeline lineno="191"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 748 | <codeline lineno="192"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 749 | <codeline lineno="193"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m2pom=m2+j;</highlight></codeline> |
|---|
| 750 | <codeline lineno="194"><highlight class="normal"></highlight></codeline> |
|---|
| 751 | <codeline lineno="195"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(k=0;<sp/>k<=columnsx;<sp/>k++)</highlight></codeline> |
|---|
| 752 | <codeline lineno="196"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 753 | <codeline lineno="197"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum+=((long)(*m1++)**m2pom)>>15;</highlight></codeline> |
|---|
| 754 | <codeline lineno="198"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>m2pom+=columns+1;</highlight></codeline> |
|---|
| 755 | <codeline lineno="199"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 756 | <codeline lineno="200"><highlight class="normal"></highlight></codeline> |
|---|
| 757 | <codeline lineno="201"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>saturation<sp/>effect</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 758 | <codeline lineno="202"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum>32767)<sp/>tmp_sum=32767;</highlight></codeline> |
|---|
| 759 | <codeline lineno="203"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum<-32768)<sp/>tmp_sum=-32768;</highlight></codeline> |
|---|
| 760 | <codeline lineno="204"><highlight class="normal"></highlight></codeline> |
|---|
| 761 | <codeline lineno="205"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=tmp_sum;</highlight></codeline> |
|---|
| 762 | <codeline lineno="206"><highlight class="normal"></highlight></codeline> |
|---|
| 763 | <codeline lineno="207"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 764 | <codeline lineno="208"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m1-=(columnsx+1);</highlight></codeline> |
|---|
| 765 | <codeline lineno="209"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 766 | <codeline lineno="210"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columnsx+1);</highlight></codeline> |
|---|
| 767 | <codeline lineno="211"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 768 | <codeline lineno="212"><highlight class="normal">}</highlight></codeline> |
|---|
| 769 | <codeline lineno="213"><highlight class="normal"></highlight></codeline> |
|---|
| 770 | <codeline lineno="214"><highlight class="normal"></highlight></codeline> |
|---|
| 771 | <codeline lineno="215"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>multiplication<sp/>in<sp/>q15<sp/>(sum<sp/>is<sp/>in<sp/>q15):<sp/>m1[rows,columnsx]*(m2[columns,columnsx]transpose)<sp/>=<sp/>result[rows,columns]<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 772 | <codeline lineno="216"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultt15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 773 | <codeline lineno="217"><highlight class="normal">columns)</highlight></codeline> |
|---|
| 774 | <codeline lineno="218"><highlight class="normal">{</highlight></codeline> |
|---|
| 775 | <codeline lineno="219"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/>j,<sp/>k;</highlight></codeline> |
|---|
| 776 | <codeline lineno="220"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 777 | <codeline lineno="221"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2pom=m2;</highlight></codeline> |
|---|
| 778 | <codeline lineno="222"><highlight class="normal"></highlight></codeline> |
|---|
| 779 | <codeline lineno="223"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 780 | <codeline lineno="224"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 781 | <codeline lineno="225"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 782 | <codeline lineno="226"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 783 | <codeline lineno="227"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(k=0;<sp/>k<=columnsx;<sp/>k++)</highlight></codeline> |
|---|
| 784 | <codeline lineno="228"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum+=((</highlight><highlight class="keywordtype">long</highlight><highlight class="normal">)(*m1++)*(*m2pom++))>>15;</highlight></codeline> |
|---|
| 785 | <codeline lineno="229"><highlight class="normal"></highlight></codeline> |
|---|
| 786 | <codeline lineno="230"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>saturation<sp/>effect</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 787 | <codeline lineno="231"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum>32767)<sp/>tmp_sum=32767;</highlight></codeline> |
|---|
| 788 | <codeline lineno="232"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum<-32768)<sp/>tmp_sum=-32768;</highlight></codeline> |
|---|
| 789 | <codeline lineno="233"><highlight class="normal"></highlight></codeline> |
|---|
| 790 | <codeline lineno="234"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=tmp_sum;</highlight></codeline> |
|---|
| 791 | <codeline lineno="235"><highlight class="normal"></highlight></codeline> |
|---|
| 792 | <codeline lineno="236"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 793 | <codeline lineno="237"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m1-=(columnsx+1);</highlight></codeline> |
|---|
| 794 | <codeline lineno="238"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 795 | <codeline lineno="239"><highlight class="normal"><sp/><sp/><sp/><sp/>m2pom=m2;</highlight></codeline> |
|---|
| 796 | <codeline lineno="240"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columnsx+1);</highlight></codeline> |
|---|
| 797 | <codeline lineno="241"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 798 | <codeline lineno="242"><highlight class="normal">}</highlight></codeline> |
|---|
| 799 | <codeline lineno="243"><highlight class="normal"></highlight></codeline> |
|---|
| 800 | <codeline lineno="244"><highlight class="normal"></highlight></codeline> |
|---|
| 801 | <codeline lineno="245"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Matrix<sp/>multiplication<sp/>-<sp/>Q15<sp/>*<sp/>Q30<sp/>format<sp/>-><sp/>RESULT<sp/>in<sp/>Q15<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 802 | <codeline lineno="246"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmult1530(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 803 | <codeline lineno="247"><highlight class="normal">columns)</highlight></codeline> |
|---|
| 804 | <codeline lineno="248"><highlight class="normal">{</highlight></codeline> |
|---|
| 805 | <codeline lineno="249"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/>j,<sp/>k;</highlight></codeline> |
|---|
| 806 | <codeline lineno="250"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 807 | <codeline lineno="251"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>*m2pom;</highlight></codeline> |
|---|
| 808 | <codeline lineno="252"><highlight class="normal"></highlight></codeline> |
|---|
| 809 | <codeline lineno="253"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 810 | <codeline lineno="254"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 811 | <codeline lineno="255"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 812 | <codeline lineno="256"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 813 | <codeline lineno="257"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m2pom=m2+j;</highlight></codeline> |
|---|
| 814 | <codeline lineno="258"><highlight class="normal"></highlight></codeline> |
|---|
| 815 | <codeline lineno="259"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(k=0;<sp/>k<=columnsx;<sp/>k++)</highlight></codeline> |
|---|
| 816 | <codeline lineno="260"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 817 | <codeline lineno="261"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum+=(long)(*m1++)**m2pom;</highlight></codeline> |
|---|
| 818 | <codeline lineno="262"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/>m2pom+=columns+1;</highlight></codeline> |
|---|
| 819 | <codeline lineno="263"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 820 | <codeline lineno="264"><highlight class="normal"></highlight></codeline> |
|---|
| 821 | <codeline lineno="265"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="comment">//<sp/>saturation<sp/>effect</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 822 | <codeline lineno="266"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=tmp_sum>>15;</highlight></codeline> |
|---|
| 823 | <codeline lineno="267"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum>32767)<sp/>tmp_sum=32767;</highlight></codeline> |
|---|
| 824 | <codeline lineno="268"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(tmp_sum<-32768)<sp/>tmp_sum=-32768;</highlight></codeline> |
|---|
| 825 | <codeline lineno="269"><highlight class="normal"></highlight></codeline> |
|---|
| 826 | <codeline lineno="270"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=tmp_sum;</highlight></codeline> |
|---|
| 827 | <codeline lineno="271"><highlight class="normal"></highlight></codeline> |
|---|
| 828 | <codeline lineno="272"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>tmp_sum=0;</highlight></codeline> |
|---|
| 829 | <codeline lineno="273"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>m1-=(columnsx+1);</highlight></codeline> |
|---|
| 830 | <codeline lineno="274"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 831 | <codeline lineno="275"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columnsx+1);</highlight></codeline> |
|---|
| 832 | <codeline lineno="276"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 833 | <codeline lineno="277"><highlight class="normal">}</highlight></codeline> |
|---|
| 834 | <codeline lineno="278"><highlight class="normal"><sp/></highlight></codeline> |
|---|
| 835 | <codeline lineno="279"><highlight class="normal"></highlight></codeline> |
|---|
| 836 | <codeline lineno="280"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Left<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>ones<sp/>matrix<sp/>in<sp/>q15:<sp/>DIAG[rows,columnsx]*m2[columnsx,columns]<sp/>=<sp/>result[rows,columns]<sp/></highlight></codeline> |
|---|
| 837 | <codeline lineno="281"><highlight class="comment">minrowcol=minimum(rows,<sp/>columnsx)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 838 | <codeline lineno="282"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDl(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 839 | <codeline lineno="283"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol)</highlight></codeline> |
|---|
| 840 | <codeline lineno="284"><highlight class="normal">{</highlight></codeline> |
|---|
| 841 | <codeline lineno="285"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j;</highlight></codeline> |
|---|
| 842 | <codeline lineno="286"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>int<sp/>*res_tmp=result;<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 843 | <codeline lineno="287"><highlight class="normal"><sp/><sp/></highlight></codeline> |
|---|
| 844 | <codeline lineno="288"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>This<sp/>erase<sp/>sequence<sp/>have<sp/>to<sp/>be<sp/>enabled<sp/>in<sp/>case<sp/>that<sp/>result<sp/>matrix<sp/>has<sp/>more<sp/>terms<sp/>than<sp/>DIAG<sp/>matrix<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 845 | <codeline lineno="289"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>for<sp/>(i=0;i<=rows;i++)<sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
|---|
| 846 | <codeline lineno="290"><highlight class="comment"><sp/><sp/><sp/><sp/>for<sp/>(j=0;j<=columns;j++)</highlight></codeline> |
|---|
| 847 | <codeline lineno="291"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*res_tmp++=0;</highlight></codeline> |
|---|
| 848 | <codeline lineno="292"><highlight class="comment">/*<sp/>END<sp/>OF<sp/>ERASE<sp/>SEQUENCE<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 849 | <codeline lineno="293"><highlight class="normal"></highlight></codeline> |
|---|
| 850 | <codeline lineno="294"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i<=minrowcol;i++)</highlight></codeline> |
|---|
| 851 | <codeline lineno="295"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;j<=columns;j++)</highlight></codeline> |
|---|
| 852 | <codeline lineno="296"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=*m2++;</highlight></codeline> |
|---|
| 853 | <codeline lineno="297"><highlight class="normal">}</highlight></codeline> |
|---|
| 854 | <codeline lineno="298"><highlight class="normal"></highlight></codeline> |
|---|
| 855 | <codeline lineno="299"><highlight class="normal"></highlight></codeline> |
|---|
| 856 | <codeline lineno="300"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Left<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>matrix<sp/>in<sp/>q15:<sp/>DIAG[rows,columnsx]*m2[columnsx,columns]<sp/>=<sp/>result[rows,columns]<sp/></highlight></codeline> |
|---|
| 857 | <codeline lineno="301"><highlight class="comment">minrowcol=minimum(rows,<sp/>columnsx)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 858 | <codeline lineno="302"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDl15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*DIAG,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m2,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 859 | <codeline lineno="303"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol)</highlight></codeline> |
|---|
| 860 | <codeline lineno="304"><highlight class="normal">{</highlight></codeline> |
|---|
| 861 | <codeline lineno="305"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j;</highlight></codeline> |
|---|
| 862 | <codeline lineno="306"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>int<sp/>*res_tmp=result;<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 863 | <codeline lineno="307"><highlight class="normal"></highlight></codeline> |
|---|
| 864 | <codeline lineno="308"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>This<sp/>erase<sp/>sequence<sp/>have<sp/>to<sp/>be<sp/>enabled<sp/>in<sp/>case<sp/>that<sp/>result<sp/>matrix<sp/>has<sp/>more<sp/>terms<sp/>than<sp/>DIAG<sp/>matrix<sp/>*/</highlight><highlight class="normal"><sp/><sp/></highlight></codeline> |
|---|
| 865 | <codeline lineno="309"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>for<sp/>(i=0;i<=rows;i++)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
|---|
| 866 | <codeline lineno="310"><highlight class="comment"><sp/><sp/><sp/><sp/>for<sp/>(j=0;j<=columns;j++)</highlight></codeline> |
|---|
| 867 | <codeline lineno="311"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*res_tmp++=0;</highlight></codeline> |
|---|
| 868 | <codeline lineno="312"><highlight class="comment">/*<sp/>END<sp/>OF<sp/>ERASE<sp/>SEQUENCE<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 869 | <codeline lineno="313"><highlight class="normal"></highlight></codeline> |
|---|
| 870 | <codeline lineno="314"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i<=minrowcol;i++)</highlight></codeline> |
|---|
| 871 | <codeline lineno="315"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 872 | <codeline lineno="316"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;j<=columns;j++)</highlight></codeline> |
|---|
| 873 | <codeline lineno="317"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=((</highlight><highlight class="keywordtype">long</highlight><highlight class="normal">)(*DIAG)*(*m2++))>>15;</highlight></codeline> |
|---|
| 874 | <codeline lineno="318"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline> |
|---|
| 875 | <codeline lineno="319"><highlight class="normal"><sp/><sp/><sp/><sp/>DIAG+=(columnsx+1);</highlight></codeline> |
|---|
| 876 | <codeline lineno="320"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 877 | <codeline lineno="321"><highlight class="normal">}</highlight></codeline> |
|---|
| 878 | <codeline lineno="322"><highlight class="normal"></highlight></codeline> |
|---|
| 879 | <codeline lineno="323"><highlight class="normal"></highlight></codeline> |
|---|
| 880 | <codeline lineno="324"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Right<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>ones<sp/>matrix<sp/>in<sp/>q15:<sp/>m1[rows,columnsx]*DIAG[columnsx,columns]<sp/>=<sp/>result[rows,columns]<sp/></highlight></codeline> |
|---|
| 881 | <codeline lineno="325"><highlight class="comment">minrowcol=minimum(columnsx,columns)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 882 | <codeline lineno="326"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDr(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 883 | <codeline lineno="327"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol)</highlight></codeline> |
|---|
| 884 | <codeline lineno="328"><highlight class="normal">{</highlight></codeline> |
|---|
| 885 | <codeline lineno="329"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j;</highlight></codeline> |
|---|
| 886 | <codeline lineno="330"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>int<sp/>*res_tmp=result;<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 887 | <codeline lineno="331"><highlight class="normal"></highlight></codeline> |
|---|
| 888 | <codeline lineno="332"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>This<sp/>erase<sp/>sequence<sp/>have<sp/>to<sp/>be<sp/>enabled<sp/>in<sp/>case<sp/>that<sp/>result<sp/>matrix<sp/>has<sp/>more<sp/>terms<sp/>than<sp/>DIAG<sp/>matrix<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 889 | <codeline lineno="333"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>for<sp/>(i=0;i<=rows;i++)</highlight></codeline> |
|---|
| 890 | <codeline lineno="334"><highlight class="comment"><sp/><sp/><sp/><sp/>for<sp/>(j=0;j<=columns;j++)</highlight></codeline> |
|---|
| 891 | <codeline lineno="335"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*res_tmp++=0;</highlight></codeline> |
|---|
| 892 | <codeline lineno="336"><highlight class="comment">/*<sp/>END<sp/>OF<sp/>ERASE<sp/>SEQUENCE<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 893 | <codeline lineno="337"><highlight class="normal"></highlight></codeline> |
|---|
| 894 | <codeline lineno="338"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i<=rows;i++)</highlight></codeline> |
|---|
| 895 | <codeline lineno="339"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 896 | <codeline lineno="340"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;j<=minrowcol;j++)</highlight></codeline> |
|---|
| 897 | <codeline lineno="341"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=*m1++;</highlight></codeline> |
|---|
| 898 | <codeline lineno="342"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight></codeline> |
|---|
| 899 | <codeline lineno="343"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columnsx-minrowcol);</highlight></codeline> |
|---|
| 900 | <codeline lineno="344"><highlight class="normal"><sp/><sp/><sp/><sp/>result+=(columns-minrowcol);</highlight></codeline> |
|---|
| 901 | <codeline lineno="345"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 902 | <codeline lineno="346"><highlight class="normal">}<sp/><sp/></highlight></codeline> |
|---|
| 903 | <codeline lineno="347"><highlight class="normal"></highlight></codeline> |
|---|
| 904 | <codeline lineno="348"><highlight class="normal"></highlight></codeline> |
|---|
| 905 | <codeline lineno="349"><highlight class="normal"></highlight></codeline> |
|---|
| 906 | <codeline lineno="350"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>Right<sp/>matrix<sp/>multiplication<sp/>with<sp/>DIAG<sp/>matrix<sp/>in<sp/>q15:<sp/>m1[rows,columnsx]*DIAG[columnsx,columns]<sp/>=<sp/>result[rows,columns]<sp/></highlight></codeline> |
|---|
| 907 | <codeline lineno="351"><highlight class="comment">minrowcol=minimum(columnsx,columns)<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 908 | <codeline lineno="352"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mmultDr15(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*DIAG,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columnsx,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 909 | <codeline lineno="353"><highlight class="normal">columns,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>minrowcol)</highlight></codeline> |
|---|
| 910 | <codeline lineno="354"><highlight class="normal">{</highlight></codeline> |
|---|
| 911 | <codeline lineno="355"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,j;</highlight></codeline> |
|---|
| 912 | <codeline lineno="356"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*DIAG_tmp=DIAG;</highlight></codeline> |
|---|
| 913 | <codeline lineno="357"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>int<sp/>*res_tmp=result;<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 914 | <codeline lineno="358"><highlight class="normal"></highlight></codeline> |
|---|
| 915 | <codeline lineno="359"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>This<sp/>erase<sp/>sequence<sp/>have<sp/>to<sp/>be<sp/>enabled<sp/>in<sp/>case<sp/>that<sp/>result<sp/>matrix<sp/>has<sp/>more<sp/>terms<sp/>than<sp/>DIAG<sp/>matrix<sp/>*/</highlight><highlight class="normal"><sp/><sp/></highlight></codeline> |
|---|
| 916 | <codeline lineno="360"><highlight class="normal"></highlight><highlight class="comment">/*<sp/><sp/>for<sp/>(i=0;i<=rows;i++)<sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
|---|
| 917 | <codeline lineno="361"><highlight class="comment"><sp/><sp/><sp/><sp/>for<sp/>(j=0;j<=columns;j++)</highlight></codeline> |
|---|
| 918 | <codeline lineno="362"><highlight class="comment"><sp/><sp/><sp/><sp/><sp/><sp/>*res_tmp++=0;</highlight></codeline> |
|---|
| 919 | <codeline lineno="363"><highlight class="comment">/*<sp/>END<sp/>OF<sp/>ERASE<sp/>SEQUENCE<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 920 | <codeline lineno="364"><highlight class="normal"></highlight></codeline> |
|---|
| 921 | <codeline lineno="365"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;i<=rows;i++)</highlight></codeline> |
|---|
| 922 | <codeline lineno="366"><highlight class="normal"><sp/><sp/>{</highlight></codeline> |
|---|
| 923 | <codeline lineno="367"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;j<=minrowcol;j++)</highlight></codeline> |
|---|
| 924 | <codeline lineno="368"><highlight class="normal"><sp/><sp/><sp/><sp/>{</highlight></codeline> |
|---|
| 925 | <codeline lineno="369"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=((long)(*m1++)**DIAG_tmp)>>15;</highlight></codeline> |
|---|
| 926 | <codeline lineno="370"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>DIAG_tmp+=columns+2;</highlight></codeline> |
|---|
| 927 | <codeline lineno="371"><highlight class="normal"><sp/><sp/><sp/><sp/>}</highlight></codeline> |
|---|
| 928 | <codeline lineno="372"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/></highlight></codeline> |
|---|
| 929 | <codeline lineno="373"><highlight class="normal"><sp/><sp/><sp/><sp/>DIAG_tmp=DIAG;</highlight></codeline> |
|---|
| 930 | <codeline lineno="374"><highlight class="normal"><sp/><sp/><sp/><sp/>m1+=(columnsx-minrowcol);</highlight></codeline> |
|---|
| 931 | <codeline lineno="375"><highlight class="normal"><sp/><sp/><sp/><sp/>result+=(columns-minrowcol);</highlight></codeline> |
|---|
| 932 | <codeline lineno="376"><highlight class="normal"><sp/><sp/>}</highlight></codeline> |
|---|
| 933 | <codeline lineno="377"><highlight class="normal">}<sp/><sp/></highlight></codeline> |
|---|
| 934 | <codeline lineno="378"><highlight class="normal"></highlight></codeline> |
|---|
| 935 | <codeline lineno="379"><highlight class="normal"></highlight></codeline> |
|---|
| 936 | <codeline lineno="380"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>matrix<sp/>transposition<sp/>-<sp/>neni<sp/>optimalizovana,<sp/>protoze<sp/>se<sp/>nepouziva<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 937 | <codeline lineno="381"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>mtrans(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m1,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>rows,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns)</highlight></codeline> |
|---|
| 938 | <codeline lineno="382"><highlight class="normal">{</highlight></codeline> |
|---|
| 939 | <codeline lineno="383"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i,<sp/>j;</highlight></codeline> |
|---|
| 940 | <codeline lineno="384"><highlight class="normal"><sp/><sp/></highlight></codeline> |
|---|
| 941 | <codeline lineno="385"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(i=0;<sp/>i<=rows;<sp/>i++)</highlight></codeline> |
|---|
| 942 | <codeline lineno="386"><highlight class="normal"><sp/><sp/><sp/><sp/></highlight><highlight class="keywordflow">for</highlight><highlight class="normal"><sp/>(j=0;<sp/>j<=columns;<sp/>j++)</highlight></codeline> |
|---|
| 943 | <codeline lineno="387"><highlight class="normal"><sp/><sp/><sp/><sp/><sp/><sp/>*result++=*(m1+(columns+1)*j+i);</highlight></codeline> |
|---|
| 944 | <codeline lineno="388"><highlight class="normal">}</highlight></codeline> |
|---|
| 945 | <codeline lineno="389"><highlight class="normal"></highlight></codeline> |
|---|
| 946 | <codeline lineno="390"><highlight class="normal"></highlight><highlight class="comment">/*<sp/>matrix<sp/>[2,2]<sp/>inversion<sp/>*/</highlight><highlight class="normal"></highlight></codeline> |
|---|
| 947 | <codeline lineno="391"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>minv2(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*matrix,<sp/></highlight><highlight class="keywordtype">long</highlight><highlight class="normal"><sp/>*result)</highlight></codeline> |
|---|
| 948 | <codeline lineno="392"><highlight class="normal">{</highlight></codeline> |
|---|
| 949 | <codeline lineno="393"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>det;</highlight></codeline> |
|---|
| 950 | <codeline lineno="394"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>i;</highlight></codeline> |
|---|
| 951 | <codeline lineno="395"><highlight class="normal"></highlight></codeline> |
|---|
| 952 | <codeline lineno="396"><highlight class="normal"><sp/><sp/>det=((long)*matrix**(matrix+3)-(long)*(matrix+1)**(matrix+2))>>15;</highlight></codeline> |
|---|
| 953 | <codeline lineno="397"><highlight class="normal"><sp/><sp/></highlight><highlight class="keywordflow">if</highlight><highlight class="normal"><sp/>(det==0)<sp/>det=1;</highlight></codeline> |
|---|
| 954 | <codeline lineno="398"><highlight class="normal"></highlight></codeline> |
|---|
| 955 | <codeline lineno="399"><highlight class="normal"><sp/><sp/>*result++=(((long)*(matrix+3))<<15)/det;</highlight></codeline> |
|---|
| 956 | <codeline lineno="400"><highlight class="normal"><sp/><sp/>*result++=(((long)*(matrix+1))<<15)/det;</highlight></codeline> |
|---|
| 957 | <codeline lineno="401"><highlight class="normal"><sp/><sp/>*result++=(((long)*(matrix+2))<<15)/det;</highlight></codeline> |
|---|
| 958 | <codeline lineno="402"><highlight class="normal"><sp/><sp/>*result++=(((long)*matrix)<<15)/det;</highlight></codeline> |
|---|
| 959 | <codeline lineno="403"><highlight class="normal">}</highlight></codeline> |
|---|
| 960 | <codeline lineno="404"><highlight class="normal"></highlight></codeline> |
|---|
| 961 | <codeline lineno="405"><highlight class="normal"></highlight></codeline> |
|---|
| 962 | <codeline lineno="406"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>choice_P(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result,<sp/></highlight><highlight class="keywordtype">unsigned</highlight><highlight class="normal"><sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>columns)</highlight></codeline> |
|---|
| 963 | <codeline lineno="407"><highlight class="normal">{</highlight></codeline> |
|---|
| 964 | <codeline lineno="408"><highlight class="normal"><sp/><sp/>*result++=*m;</highlight></codeline> |
|---|
| 965 | <codeline lineno="409"><highlight class="normal"><sp/><sp/>*result++=*(m+1);</highlight></codeline> |
|---|
| 966 | <codeline lineno="410"><highlight class="normal"><sp/><sp/>*result++=*(m+columns+1);</highlight></codeline> |
|---|
| 967 | <codeline lineno="411"><highlight class="normal"><sp/><sp/>*result++=*(m+columns+2);</highlight></codeline> |
|---|
| 968 | <codeline lineno="412"><highlight class="normal">}</highlight></codeline> |
|---|
| 969 | <codeline lineno="413"><highlight class="normal"></highlight></codeline> |
|---|
| 970 | <codeline lineno="414"><highlight class="normal"></highlight></codeline> |
|---|
| 971 | <codeline lineno="415"><highlight class="normal"></highlight><highlight class="keywordtype">void</highlight><highlight class="normal"><sp/>choice_x(</highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*m,<sp/></highlight><highlight class="keywordtype">int</highlight><highlight class="normal"><sp/>*result)</highlight></codeline> |
|---|
| 972 | <codeline lineno="416"><highlight class="normal">{</highlight></codeline> |
|---|
| 973 | <codeline lineno="417"><highlight class="normal"><sp/><sp/>*result++=*m++;</highlight></codeline> |
|---|
| 974 | <codeline lineno="418"><highlight class="normal"><sp/><sp/>*result=*m;</highlight></codeline> |
|---|
| 975 | <codeline lineno="419"><highlight class="normal">}</highlight></codeline> |
|---|
| 976 | <codeline lineno="420"><highlight class="normal"></highlight></codeline> |
|---|
| 977 | </programlisting> |
|---|
| 978 | <location file="/home/smidl/work/git/mixpp/pmsm/simulator_zdenek/ekf_example/matrix.cpp"/> |
|---|
| 979 | </compounddef> |
|---|
| 980 | </doxygen> |
|---|