-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow setting OutputElementType
within @tasks
#92
Comments
We should probably just generally make f(v; kw...) = @ tasks for x in v
@set kw...
@set collect=true
sin(x)
end That does raise the question of |
Update: We decided to pass julia> @tasks for i in 1:10
@set scheduler=:greedy
@set collect=true
@set outputtype=Float64
sin(i)
end
ERROR: MethodError: no method matching GreedyScheduler(; outputtype::DataType)
Closest candidates are:
GreedyScheduler(; ntasks, nchunks, chunksize, chunking, split) got unsupported keyword argument "outputtype"
@ OhMyThreads ~/.julia/packages/OhMyThreads/eiaNP/src/schedulers.jl:298
GreedyScheduler(::Int64, ::Integer, ::Integer, ::Union{ChunkSplitters.Split, Symbol}; chunking) got unsupported keyword argument "outputtype"
@ OhMyThreads ~/.julia/packages/OhMyThreads/eiaNP/src/schedulers.jl:271
Stacktrace:
[1] kwerr(kw::@NamedTuple{outputtype::DataType}, args::Type)
@ Base ./error.jl:165
[2] scheduler_from_symbol(::Type{Val{:greedy}}; kwargs::@Kwargs{outputtype::DataType})
@ OhMyThreads.Schedulers ~/.julia/packages/OhMyThreads/eiaNP/src/schedulers.jl:355
[3] scheduler_from_symbol(s::Symbol; kwargs::@Kwargs{outputtype::DataType})
@ OhMyThreads.Schedulers ~/.julia/packages/OhMyThreads/eiaNP/src/schedulers.jl:352
[4] scheduler_from_symbol
@ ~/.julia/packages/OhMyThreads/eiaNP/src/schedulers.jl:352 [inlined]
[5] #_scheduler_from_userinput#20
@ ~/.julia/packages/OhMyThreads/eiaNP/src/implementation.jl:44 [inlined]
[6] _scheduler_from_userinput
@ ~/.julia/packages/OhMyThreads/eiaNP/src/implementation.jl:39 [inlined]
[7] tmap(::Function, ::UnitRange{Int64}; scheduler::Symbol, kwargs::@Kwargs{outputtype::DataType})
@ OhMyThreads.Implementation ~/.julia/packages/OhMyThreads/eiaNP/src/implementation.jl:342
[8] macro expansion
@ ~/.julia/packages/OhMyThreads/eiaNP/src/macro_impl.jl:98 [inlined]
[9] top-level scope
@ REPL[4]:1 We could add explicit support for |
See
#TODO
inmacro_impl.jl
. Especially relevant because it's sometimes required:The text was updated successfully, but these errors were encountered: