Skip to content
This repository was archived by the owner on Aug 22, 2025. It is now read-only.

Commit ee7268c

Browse files
fix tmp size
1 parent 9f6d7f0 commit ee7268c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/differentiation/compute_jacobian_ad.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,11 @@ function generate_chunked_partials(x,colorvec,::Val{chunksize}) where chunksize
6666
padding_matrix = BitMatrix(undef, length(x), padding_size)
6767
partials = hcat(partials, padding_matrix)
6868

69+
70+
#chunked_partials = map(i -> Tuple.(eachrow(partials[:,(i-1)*chunksize+1:i*chunksize])),1:num_of_chunks)
6971
chunked_partials = Vector{Vector{NTuple{chunksize,eltype(x)}}}(undef, num_of_chunks)
7072
for i in 1:num_of_chunks
71-
tmp = Vector{NTuple{chunksize,eltype(x)}}(undef, chunksize)
73+
tmp = Vector{NTuple{chunksize,eltype(x)}}(undef, size(partials,1))
7274
for j in 1:size(partials,1)
7375
tmp[j] = Tuple(@view partials[j,(i-1)*chunksize+1:i*chunksize])
7476
end

0 commit comments

Comments
 (0)