Internals
Transducers.UseSIMD — Type.UseSIMD{ivdep}()Tell the reducible to run the inner reducing function using @simd. The reducible can support it using @simd_if.
Transducers._teezip_lens — Function._teezip_lens(rf) :: LensReturn a lens to the .value field of the first "unbalanced" Joiner. A Joiner matched with preceding Splitter would be treated as a regular reducing function node. Thus, reducing function rf must have one more Joiner than Splitter.
Transducers.air — Method.air.(broadcasting_expression) :: BroadcastedBroadcast without materialization.
The idea is taken from @dawbarton's _lazy function: https://discourse.julialang.org/t/19641/20.
Transducers.foldl_nocomplete — Method.Transducers.maybe_usesimd — Method.maybe_usesimd(xform, simd)Insert UseSIMD to xform if appropriate.
Arguments
xform::Transducersimd:false,true, or:ivdep.
Examples
julia> using Transducers
using Transducers: maybe_usesimd
julia> maybe_usesimd(eduction(Map(identity), 1:1).rf, false)
Reduction{▶ Int64}(
Map(identity),
BottomRF{▶ Int64}(
Completing{typeof(push!)}(push!)))
julia> maybe_usesimd(eduction(Map(identity), 1:1).rf, true)
Reduction{▶ Int64}(
Transducers.UseSIMD{false}(),
Reduction{▶ Int64}(
Map(identity),
BottomRF{▶ Int64}(
Completing{typeof(push!)}(push!))))
julia> maybe_usesimd(eduction(Cat(), 1:1).rf, true)
Reduction{▶ Int64}(
Cat(),
Reduction{▶ Int64}(
Transducers.UseSIMD{false}(),
BottomRF{▶ Int64}(
Completing{typeof(push!)}(push!))))
julia> maybe_usesimd(eduction(Map(sin) |> Cat() |> Map(cos), 1:1).rf, :ivdep)
Reduction{▶ Int64}(
Map(sin),
Reduction{▶ Float64}(
Cat(),
Reduction{▶ Float64}(
Transducers.UseSIMD{true}(),
Reduction{▶ Float64}(
Map(cos),
BottomRF{▶ Float64}(
Completing{typeof(push!)}(push!))))))
julia> maybe_usesimd(eduction(Map(sin) |> Cat() |> Map(cos) |> Cat() |> Map(tan), 1:1).rf, true)
Reduction{▶ Int64}(
Map(sin),
Reduction{▶ Float64}(
Cat(),
Reduction{▶ Float64}(
Map(cos),
Reduction{▶ Float64}(
Cat(),
Reduction{▶ Float64}(
Transducers.UseSIMD{false}(),
Reduction{▶ Float64}(
Map(tan),
BottomRF{▶ Float64}(
Completing{typeof(push!)}(push!))))))))Transducers.reform — Method.reform(rf, f)Reset "bottom" reducing function of rf to f.
Transducers.simple_transduce — Method.simple_transduce(xform, step, init, coll)Simplified version of transduce. For simple transducers Julia may be able to emit a good code. This function exists only for performance tuning.
Transducers.usesimd — Method.usesimd(rf::Reduction, xfsimd::UseSIMD)Wrap the inner-most loop of reducing function rf with xfsimd. xfsimd is inserted after the inner-most Cat if rf includes Cat.
Transducers.@simd_if — Macro.@simd_if rf for ... endWrap for-loop with @simd if the outer most transducer of the reducing function rf is UseSIMD.
Transducers.@~ — Macro.(@~ broadcasting_expression) :: Broadcasted