- macro def(name, definition) # thanks to http://www.stochasticlifestyle.com/type-dispatch-design-post-object-oriented-programming-julia/
- return esc(quote
- macro $name()
- esc($(Expr(:quote, definition)))
- end
- end)
- end
-
- macro cthreads(condition::Symbol,loop::Expr) #does not work well because of #15276, but seems to work on Julia v0.7
- return esc(quote
- if $condition
- Threads.@threads $loop
- else
- $loop
- end
- end)
- end
-
- macro mthreads(ex)