Skip to content

Commit ba5b7c4

Browse files
committed
Rename k to offset
1 parent 71f69d5 commit ba5b7c4

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

src/Nonlinear/ReverseAD/forward_over_reverse.jl

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,14 @@ function _eval_hessian_inner(
5555
num_products = size(ex.seed_matrix, 2) # number of hessian-vector products
5656
num_chunks = div(num_products, CHUNK)
5757
@assert size(ex.seed_matrix, 1) == length(ex.rinfo.local_indices)
58-
for k in 1:CHUNK:CHUNK*num_chunks
59-
_eval_hessian_chunk(d, ex, k, CHUNK, Val(CHUNK))
58+
for offset in 1:CHUNK:CHUNK*num_chunks
59+
_eval_hessian_chunk(d, ex, offset, CHUNK, Val(CHUNK))
6060
end
6161
# leftover chunk
6262
remaining = num_products - CHUNK * num_chunks
6363
if remaining > 0
64-
_eval_hessian_chunk(
65-
d,
66-
ex,
67-
CHUNK * num_chunks + 1,
68-
remaining,
69-
Val(CHUNK),
70-
)
64+
offset = CHUNK * num_chunks + 1
65+
_eval_hessian_chunk(d, ex, offset, remaining, Val(CHUNK))
7166
end
7267
want, got = nzcount + length(ex.hess_I), length(H)
7368
if want > got

0 commit comments

Comments
 (0)