We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c43f994 commit 2e7cb39Copy full SHA for 2e7cb39
src/Operators/general/algebra.jl
@@ -573,15 +573,22 @@ end
573
-(A::Operator) = ConstantTimesOperator(-1,A)
574
-(A::Operator,B::Operator) = A+(-B)
575
576
-
577
-function *(f::Fun, A::Operator)
+@inline function _mulop(f::Fun, A::Operator)
578
if isafunctional(A) && (isinf(bandwidth(A,1)) || isinf(bandwidth(A,2)))
579
LowRankOperator(f,A)
580
else
581
TimesOperator(Multiplication(f,rangespace(A)),A)
582
end
583
584
+@static if VERSION >= v"1.8"
585
+ Base.@constprop :aggressive function *(f::Fun, A::Operator)
586
+ _mulop(f, A)
587
+ end
588
+else
589
+ *(f::Fun, A::Operator) = _mulop(f, A)
590
+end
591
+
592
*(c::Number,A::Operator) = ConstantTimesOperator(c,A)
593
*(A::Operator,c::Number) = c*A
594
0 commit comments