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

JuliaFolds / Transducers.jl / 1219
93%

Build:
DEFAULT BRANCH: master
Ran 20 Jan 2020 01:49AM UTC
Jobs 2
Files 20
Run time 2s
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

pending completion
1219

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′`.

1044 of 1185 relevant lines covered (88.1%)

771490.78 hits per line

Jobs
ID Job ID Ran Files Coverage
1 1219.1 20 Jan 2020 01:49AM UTC 0
88.1
Travis Job 1219.1
2 1219.2 20 Jan 2020 01:50AM UTC 0
92.76
Travis Job 1219.2
Source Files on build 1219
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1219
  • 9a84bb32 on github
  • Prev Build on master (#1215)
  • Next Build on master (#1222)
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