We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f47b08d commit ca28ff5Copy full SHA for ca28ff5
3 files changed
src/DiagonalHessianApproximation.jl
@@ -246,3 +246,10 @@ function push!(
246
B.d .*= sum(B.d) / sT_y
247
return B
248
end
249
+
250
+for op in (DiagonalPSB, DiagonalAndrei, SpectralGradient, DiagonalBFGS)
251
+ @eval begin
252
+ isallocated5(::$op) = true
253
+ has_args5(::$op) = true
254
+ end
255
+end
src/TimedOperators.jl
@@ -26,9 +26,9 @@ Creates a linear operator instrumented with timers from TimerOutputs.
26
"""
27
function TimedLinearOperator(op::AbstractLinearOperator{T}) where {T}
28
timer = TimerOutput()
29
- prod!(res, x, α, β) = @timeit timer "prod" op.prod!(res, x, α, β)
30
- tprod!(res, x, α, β) = @timeit timer "tprod" op.tprod!(res, x, α, β)
31
- ctprod!(res, x, α, β) = @timeit timer "ctprod" op.ctprod!(res, x, α, β)
+ prod!(res, x, α, β) = @timeit timer "prod" mul!(res, op, x, α, β)
+ tprod!(res, x, α, β) = @timeit timer "tprod" mul!(res, transpose(op),x, α, β)
+ ctprod!(res, x, α, β) = @timeit timer "ctprod" mul!(res, op', x, α, β)
32
TimedLinearOperator{T}(timer, op, prod!, tprod!, ctprod!)
33
34
@@ -42,7 +42,6 @@ for fn ∈ (
42
:issymmetric,
43
:ishermitian,
44
:has_args5,
45
- :use_prod5!,
46
:isallocated5,
47
:allocate_vectors_args3!,
48
:nprod,
src/abstract.jl
@@ -154,10 +154,10 @@ the 5-args `mul!`.
154
No additional vectors are generated when using the 3-args `mul!`.
155
156
!!! warning
157
- `has_nargs5` can be very slow. A better option is to use Julia's `hasmethod`
+ `has_args5` can be very slow. A better option is to use Julia's `hasmethod`
158
at points in the code where the concrete types of objects used in `mul!` are known.
159
160
- `has_nargs5` may be removed in a future release.
+ `has_args5` may be removed in a future release.
161
162
has_args5(op::AbstractLinearOperator) = get_nargs(op.prod!) == 4
163
0 commit comments