@@ -157,14 +157,14 @@ function solve_batch(prob,alg,ensemblealg::EnsembleDistributed,II,pmap_batch_siz
157157 batch_data = pmap (wp,II,batch_size= pmap_batch_size) do i
158158 batch_func (i,prob,alg;kwargs... )
159159 end
160- map (identity, batch_data)
160+ tighten_container_eltype ( batch_data)
161161end
162162
163163function solve_batch (prob,alg,:: EnsembleSerial ,II,pmap_batch_size;kwargs... )
164164 batch_data = map (II) do i
165165 batch_func (i,prob,alg;kwargs... )
166166 end
167- batch_data
167+ tighten_container_eltype ( batch_data)
168168end
169169
170170function solve_batch (prob,alg,ensemblealg:: EnsembleThreads ,II,pmap_batch_size;kwargs... )
@@ -213,7 +213,8 @@ function solve_batch(prob,alg,ensemblealg::EnsembleThreads,II,pmap_batch_size;kw
213213 _x[1 ]
214214 end
215215
216- batch_data = Vector {Core.Compiler.return_type(multithreaded_batch,Tuple{typeof(first(II))})} (undef,length (II))
216+ # batch_data = Vector{Core.Compiler.return_type(multithreaded_batch,Tuple{typeof(first(II))})}(undef,length(II))
217+ batch_data = []
217218 let
218219 if length (II) == 1 || Threads. nthreads () == 1
219220 for batch_idx in axes (batch_data, 1 )
@@ -225,7 +226,7 @@ function solve_batch(prob,alg,ensemblealg::EnsembleThreads,II,pmap_batch_size;kw
225226 end
226227 end
227228 end
228- batch_data
229+ tighten_container_eltype ( batch_data)
229230end
230231
231232function solve_batch (prob,alg,:: EnsembleSplitThreads ,II,pmap_batch_size;kwargs... )
@@ -291,7 +292,8 @@ function thread_monte(prob,II,alg,procid;kwargs...)
291292 _x[1 ]
292293 end
293294
294- batch_data = Vector {Core.Compiler.return_type(multithreaded_batch,Tuple{typeof(first(II))})} (undef,length (II))
295+ # batch_data = Vector{Core.Compiler.return_type(multithreaded_batch,Tuple{typeof(first(II))})}(undef,length(II))
296+ batch_data = []
295297
296298 let
297299 if length (II) == 1 || Threads. nthreads () == 1
@@ -304,5 +306,5 @@ function thread_monte(prob,II,alg,procid;kwargs...)
304306 end
305307 end
306308 end
307- batch_data
309+ tighten_container_eltype ( batch_data)
308310end
0 commit comments