Skip to content

Commit c5c9850

Browse files
committed
use exclamation mark for increment operations
1 parent ac1c9b3 commit c5c9850

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

src/TimedOperators.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ for fn ∈ (
4949
:ntprod,
5050
:nctprod,
5151
:storage_type,
52-
:increase_nprod,
53-
:increase_ntprod,
54-
:increase_nctprod,
52+
:increase_nprod!,
53+
:increase_ntprod!,
54+
:increase_nctprod!,
5555
:reset!,
5656
)
5757
@eval begin

src/abstract.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ nprod(op::AbstractLinearOperator) = op.nprod
150150
ntprod(op::AbstractLinearOperator) = op.ntprod
151151
nctprod(op::AbstractLinearOperator) = op.nctprod
152152

153-
increase_nprod(op::AbstractLinearOperator) = (op.nprod += 1)
154-
increase_ntprod(op::AbstractLinearOperator) = (op.ntprod += 1)
155-
increase_nctprod(op::AbstractLinearOperator) = (op.nctprod += 1)
153+
increase_nprod!(op::AbstractLinearOperator) = (op.nprod += 1)
154+
increase_ntprod!(op::AbstractLinearOperator) = (op.ntprod += 1)
155+
increase_nctprod!(op::AbstractLinearOperator) = (op.nctprod += 1)
156156

157157
"""
158158
has_args5(op)

src/adjtrans.jl

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ nprod(A::TransposeLinearOperator) = ntprod(A.parent)
5151
ntprod(A::TransposeLinearOperator) = nprod(A.parent)
5252
nctprod(A::TransposeLinearOperator) = nprod(A.parent) # (transpose(A))' = conj(A)
5353

54-
for f in [:nprod, :ntprod, :nctprod, :increase_nprod, :increase_ntprod, :increase_nctprod]
54+
for f in [:nprod, :ntprod, :nctprod, :increase_nprod!, :increase_ntprod!, :increase_nctprod!]
5555
@eval begin
5656
$f(A::ConjugateLinearOperator) = $f(A.parent)
5757
end
@@ -110,7 +110,7 @@ function mul!(
110110
return mul!(res, p, v, α, β)
111111
end
112112
if p.ctprod! !== nothing
113-
increase_nctprod(p)
113+
increase_nctprod!(p)
114114
if use_p5!
115115
return p.ctprod!(res, v, α, β)
116116
else
@@ -128,9 +128,9 @@ function mul!(
128128
end
129129
end
130130
if increment_tprod
131-
increase_ntprod(p)
131+
increase_ntprod!(p)
132132
else
133-
increase_nprod(p)
133+
increase_nprod!(p)
134134
end
135135
if use_p5!
136136
tprod!(res, v, α, β)
@@ -156,7 +156,7 @@ function mul!(
156156
return mul!(res, p, v, α, β)
157157
end
158158
if p.tprod! !== nothing
159-
increase_ntprod(p)
159+
increase_ntprod!(p)
160160
if use_p5!
161161
return p.tprod!(res, v, α, β)
162162
else
@@ -174,9 +174,9 @@ function mul!(
174174
end
175175
end
176176
if increment_ctprod
177-
increase_nctprod(p)
177+
increase_nctprod!(p)
178178
else
179-
increase_nprod(p)
179+
increase_nprod!(p)
180180
end
181181
conj!(res)
182182
if use_p5!

src/operations.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ function mul!(res::AbstractVector, op::AbstractLinearOperator{T}, v::AbstractVec
2424
has_args5(op) ||== 0) || isallocated5(op) || allocate_vectors_args3!(op)
2525
(size(v, 1) == size(op, 2) && size(res, 1) == size(op, 1)) ||
2626
throw(LinearOperatorException("shape mismatch"))
27-
increase_nprod(op)
27+
increase_nprod!(op)
2828
if use_p5!
2929
op.prod!(res, v, α, β)
3030
else

0 commit comments

Comments
 (0)