Commit 7971d49
520 dense cholesky integration (#72)
run like this:
make test_alp_cholesky_ndebug_alp_reference && tests/unit/alp_cholesky_ndebug_alp_reference -fname datasets/spd5.mtx
or
make test_alp_cholesky_ndebug_alp_reference && tests/unit/alp_cholesky_ndebug_alp_reference -n 100
The first version reads dense symmetric real matrix in Matrix Market Array format, the second version generated a random SPD matrix internally. Once input matrix is present the code calculates Cholesky decomposition and checks the result.
* views fix
* test cholesky
* First numerically correct version
* Add missing structure type traits
* Use utils print functions
* Add preliminary checks for cholesky result
* Fix a bug in print_matrix
* Fix band upper limits as the end is not included
TODO: Check other structures
* file reader enabled
currently works on general input matrices:
make test_alp_cholesky_ndebug_alp_reference && tests/unit/alp_cholesky_ndebug_alp_reference -fname ../datasets/spd5_convertotodense.mtx
But it should also work for symmetric input matrices
make test_alp_cholesky_ndebug_alp_reference && tests/unit/alp_cholesky_ndebug_alp_reference -fname ../datasets/spd5_convertotodense_symmetric.mtx
* clean prints and DEBUG
* Unit test with check or the solution by
calculating the Frobenius norm of H - L L^t
where H is the input matrix and L is Cholesky solution
H is expcted to be (currently real) symmetric matrix in
Matrix Market Array format
The code is currently generating Upper instead of lower triangular matrix,
which is solved by using the transpose view.
* remove temporary parser in implement it in a separate branch
* review and internal matrix generation
* remove temp matrix files
* spaces
Co-authored-by: Denis Jelovina <denis.jelovina@huawei.com>
Co-authored-by: Vladimir Dimic <vladimir.dimic@huawei.com>1 parent 5925496 commit 7971d49
File tree
7 files changed
+319
-74
lines changed- include/alp
- algorithms
- utils/parser
- tests
- unit
- utils
7 files changed
+319
-74
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
48 | 53 | | |
49 | 54 | | |
50 | 55 | | |
| |||
55 | 60 | | |
56 | 61 | | |
57 | 62 | | |
58 | | - | |
| 63 | + | |
59 | 64 | | |
60 | 65 | | |
61 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
62 | 73 | | |
63 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
64 | 78 | | |
65 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
66 | 83 | | |
67 | 84 | | |
68 | 85 | | |
69 | 86 | | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
77 | 113 | | |
78 | 114 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
86 | 128 | | |
87 | 129 | | |
88 | 130 | | |
89 | 131 | | |
90 | | - | |
91 | | - | |
92 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
93 | 154 | | |
94 | 155 | | |
95 | 156 | | |
96 | 157 | | |
97 | 158 | | |
98 | 159 | | |
99 | | - | |
100 | | - | |
| 160 | + | |
| 161 | + | |
101 | 162 | | |
102 | 163 | | |
103 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
104 | 170 | | |
105 | 171 | | |
| 172 | + | |
106 | 173 | | |
107 | 174 | | |
108 | 175 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
292 | 299 | | |
293 | 300 | | |
294 | 301 | | |
| |||
297 | 304 | | |
298 | 305 | | |
299 | 306 | | |
300 | | - | |
| 307 | + | |
301 | 308 | | |
302 | 309 | | |
303 | 310 | | |
| |||
337 | 344 | | |
338 | 345 | | |
339 | 346 | | |
340 | | - | |
341 | | - | |
342 | | - | |
343 | | - | |
344 | | - | |
345 | | - | |
346 | | - | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
| |||
425 | 425 | | |
426 | 426 | | |
427 | 427 | | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
428 | 444 | | |
429 | 445 | | |
430 | 446 | | |
| |||
444 | 460 | | |
445 | 461 | | |
446 | 462 | | |
447 | | - | |
| 463 | + | |
448 | 464 | | |
449 | 465 | | |
450 | 466 | | |
451 | 467 | | |
452 | 468 | | |
453 | 469 | | |
454 | | - | |
| 470 | + | |
455 | 471 | | |
456 | 472 | | |
457 | 473 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
266 | 276 | | |
267 | 277 | | |
268 | 278 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
41 | 45 | | |
42 | 46 | | |
43 | 47 | | |
| |||
0 commit comments