Sorry, I dont know if this question was answered already, but I wasn’t capable to find it.
I want to iterate over data which I want to apply to different functions, collected in an Array. In this case, I want to apply the macro benchmark to it and call a function with the specific value and the specific function to create an entry in a dict.
valuesForRun = [10000,100000,1000000,10000000,100000000]
functions::Array{Function} = [simple_loop_sum, threads_sum, sharedarray_parallel_sum, sharedarray_mapreduce, pmap_sum_nb, pmap_sum_b]
for value in valuesForRun
for i=1:length(functions)
println(functions[i])
println(typeof(functions[i]))
fun::Function = functions[i]
println(fun)
run = @benchmark fun(value);
createTestResultDict(run,fun,value);
I can iterate over data and functionArray and all println’s print the correct values, but if I try to call fun with a value, i get UndefVarError. Perhaps, there is easier way like map, also.