Skip to content

Commit 8ad3d46

Browse files
committed
Remove unneeded allocation
1 parent 01caf27 commit 8ad3d46

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/T2mapSEcorr.jl

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -183,12 +183,11 @@ function T2mapSEcorr!(
183183
indices_blocks = split_indices(length(indices), default_blocksize())
184184

185185
# Run analysis in parallel
186-
signals = permutedims(image[indices, :]) # permute image for cache locality
187-
188186
with_singlethreaded_blas() do
189187
workerpool(with_thread_buffer, indices_blocks; ntasks, verbose = !opts.Silent) do inds, thread_buffer
190-
GC.@preserve thread_buffer maps dist signals @inbounds for j in inds
191-
voxelwise_T2_distribution!(thread_buffer, maps, dist, uview(signals, :, j), opts, indices[j])
188+
GC.@preserve thread_buffer maps dist image @inbounds for j in inds
189+
I = indices[j]
190+
voxelwise_T2_distribution!(thread_buffer, maps, dist, uview(image, I, :), opts, I)
192191
end
193192
end
194193
end

0 commit comments

Comments
 (0)