I am trying to run the below mentioned code
for loop using
@threads for multi-threading, however the results always portray an error of mismatching number of outputs.
using Combinatorics, Base.Threads import Base.Threads.@threads func(x, y) result = Float64 a = Float64 @threads for c in combinations(1:n, 2) a, b = c result = func(a, b) push!(result, result) push!(a, a) end
The error observed during the processing:
DimensionMismatch("column :result has length 60 and column :a has length 50")
Please suggest an approach which make sure that no mutations from the loop are missed.