-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Aggressive constprop in istriu/istril for structured matrices (#54437)
This makes the following evaluate at compile-time: ```julia julia> U = UpperTriangular(rand(2,2)); julia> @code_typed istriu(U) CodeInfo( 1 ─ return true ) => Bool ``` Also, this reduces latency in this operation: ```julia julia> @time (U -> istriu(U))(U) 0.069995 seconds (158.88 k allocations: 8.715 MiB, 83.72% compilation time) # nightly 0.035610 seconds (156.62 k allocations: 8.594 MiB, 68.18% compilation time) # This PR ``` Similar methods are annotated for other structured matrix types, where the results may be trivially obtained from the structure for certain values of the band index `k`.
- Loading branch information
Showing
5 changed files
with
11 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters