Commit 1136bab
committed
xt::linalg::kron: support arguments of arbitrary number of dimensions
Before this commit, `xt::linalg::kron` only supports 2D arguments. This
commit proposes to add support for argument with any number of
dimensions. This change of behavior is coherent with what `numpy.kron`
does.
The current implementation is a performance step back compared to the
previous one. Until a better generic implementation is found, keeping a
couple of specialized implementations for the most used scenarios makes
sense.
Tested with `./test/test_xtensor_blas --gtest_filter=xlinalg.kron*`.1 parent 7ceb791 commit 1136bab
2 files changed
+46
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
1460 | 1461 | | |
1461 | 1462 | | |
1462 | 1463 | | |
1463 | | - | |
| 1464 | + | |
1464 | 1465 | | |
1465 | 1466 | | |
1466 | 1467 | | |
| |||
1470 | 1471 | | |
1471 | 1472 | | |
1472 | 1473 | | |
1473 | | - | |
1474 | | - | |
| 1474 | + | |
1475 | 1475 | | |
1476 | | - | |
1477 | | - | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
1478 | 1485 | | |
1479 | | - | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
1480 | 1492 | | |
1481 | | - | |
| 1493 | + | |
1482 | 1494 | | |
1483 | | - | |
1484 | | - | |
1485 | | - | |
1486 | | - | |
1487 | | - | |
1488 | | - | |
1489 | | - | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
1490 | 1506 | | |
1491 | 1507 | | |
1492 | 1508 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
369 | 385 | | |
370 | 386 | | |
371 | 387 | | |
| |||
0 commit comments