@@ -157,14 +157,14 @@ function solve_batch(prob,alg,ensemblealg::EnsembleDistributed,II,pmap_batch_siz
157
157
batch_data = pmap (wp,II,batch_size= pmap_batch_size) do i
158
158
batch_func (i,prob,alg;kwargs... )
159
159
end
160
- map (identity, batch_data)
160
+ tighten_container_eltype ( batch_data)
161
161
end
162
162
163
163
function solve_batch (prob,alg,:: EnsembleSerial ,II,pmap_batch_size;kwargs... )
164
164
batch_data = map (II) do i
165
165
batch_func (i,prob,alg;kwargs... )
166
166
end
167
- batch_data
167
+ tighten_container_eltype ( batch_data)
168
168
end
169
169
170
170
function 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
213
213
_x[1 ]
214
214
end
215
215
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 = []
217
218
let
218
219
if length (II) == 1 || Threads. nthreads () == 1
219
220
for batch_idx in axes (batch_data, 1 )
@@ -225,7 +226,7 @@ function solve_batch(prob,alg,ensemblealg::EnsembleThreads,II,pmap_batch_size;kw
225
226
end
226
227
end
227
228
end
228
- batch_data
229
+ tighten_container_eltype ( batch_data)
229
230
end
230
231
231
232
function solve_batch (prob,alg,:: EnsembleSplitThreads ,II,pmap_batch_size;kwargs... )
@@ -291,7 +292,8 @@ function thread_monte(prob,II,alg,procid;kwargs...)
291
292
_x[1 ]
292
293
end
293
294
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 = []
295
297
296
298
let
297
299
if length (II) == 1 || Threads. nthreads () == 1
@@ -304,5 +306,5 @@ function thread_monte(prob,II,alg,procid;kwargs...)
304
306
end
305
307
end
306
308
end
307
- batch_data
309
+ tighten_container_eltype ( batch_data)
308
310
end
0 commit comments