• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

JuliaFolds / Transducers.jl / 1219 / 2
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 20 Jan 2020 01:50AM UTC
Files 20
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Jan 2020 01:40AM UTC coverage: 92.761% (+20.1%) from 72.636%
1219.2

push

travis-ci-com

mergify[bot]
Generic `Reduced` handling in parallel reduce (#172)

Previously, `Reduced` did not have a meaningful behavior in parallel
`reduce` when the reducing function is not `right`:

    julia> tcollect(TakeWhile(x -> x < 5), 1:10; basesize=1)
    Empty{Array{T,1} where T}()

    julia> tcollect(TakeWhile(x -> x < 5), 1:10; basesize=2)
    1-element Array{Int64,1}:
     4

    julia> tcollect(TakeWhile(x -> x < 5), 1:10; basesize=4)
    2-element Array{Int64,1}:
     3
     4

    julia> tcollect(TakeWhile(x -> x < 5), 1:10; basesize=5)
    4-element Array{Int64,1}:
     1
     2
     3
     4

This PR fixes it by properly formulating how to execute the reducing
function when combined with `Reduced`.  This is done by "augmenting"
the reducing function `*`:

Given a semigroup `*(::T, ::T) :: T` where `!(Reduced <: T)`, fold
functions in Transducers.jl act on an "augmented" semigroup
`*′(::T′, ::T′) :: T′` where `T′ = Union{T, Reduced{T}}` defined by

    *′(a::Reduced, _) = a
    *′(a::T, b::Reduced) = reduced(a * unreduced(b))
    *′(a::T, b::T) = a * b

If `*` is a monoid with the identity element `e`, the "augmented"
semigroup `*′` is also a monoid with the identity element `e′`.

1166 of 1257 relevant lines covered (92.76%)

1256322.72 hits per line

Source Files on job 1219.2
  • Tree
  • List 0
  • Changed 19
  • Source Changed 2
  • Coverage Changed 19
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 980
  • Travis Job 1219.2
  • 9a84bb32 on github
  • Prev Job for on master (#1215.3)
  • Next Job for on master (#1222.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc