Repository navigation
Commit dedde5a
perf(numba): split curvature-matrix F assembly into per-block helpers (#505)
`_curvature_matrix_func_list_and_mapper` assembled all three blocks of F in a
single pass, so the breakdown harness could only time F as one step.
Split the two loops out into private helpers that write their block into the
`curvature_matrix` they are passed and return it:
- `_curvature_matrix_mapper_func_blocks_from` — the mapper x linear-func loop
- `_curvature_matrix_func_func_blocks_from` — the linear-func x linear-func loop
`_curvature_matrix_mapper_diag` (the mapper x mapper block) already existed.
`_curvature_matrix_func_list_and_mapper` now composes the three in the same
order, and the `curvature_matrix` cached property is untouched (mirror + diag
add unchanged).
Pure code motion — no behaviour change, bit-identical output.
`pytest test_autoarray/inversion`: 392 passed.
Step 0 of #505, so autolens_profiling can time each block separately.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SqrSVGPrFcUB1vvDsoTw3n1 parent caabe2d commit dedde5a
1 file changed
Lines changed: 62 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
505 | 505 | | |
506 | 506 | | |
507 | 507 | | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
508 | 518 | | |
509 | 519 | | |
510 | 520 | | |
511 | 521 | | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
512 | 552 | | |
513 | 553 | | |
514 | 554 | | |
| |||
544 | 584 | | |
545 | 585 | | |
546 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
547 | 609 | | |
548 | 610 | | |
549 | 611 | | |
| |||
0 commit comments