Skip to content
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

Fix corner cases and short-circuit mapreduce #302

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jishnub
Copy link
Member

@jishnub jishnub commented Oct 19, 2023

Addresses certain cases (min/max, and possibly some others) from #301

After this,

julia> C = Fill(1,10000000)
10000000-element Fill{Int64}, with entries equal to 1

julia> @btime mapreduce(identity, max, $(Ref(C))[])
  2.950 ns (0 allocations: 0 bytes)
1

Also fixes certain corner cases to make the reductions consistent with those for Arrays.

cc: @putianyi889

@codecov
Copy link

codecov bot commented Oct 19, 2023

Codecov Report

Merging #302 (831933f) into master (fef31cd) will increase coverage by 0.00%.
Report is 5 commits behind head on master.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #302   +/-   ##
=======================================
  Coverage   99.88%   99.89%           
=======================================
  Files           7        7           
  Lines         871      940   +69     
=======================================
+ Hits          870      939   +69     
  Misses          1        1           
Files Coverage Δ
src/FillArrays.jl 100.00% <100.00%> (ø)
src/fillalgebra.jl 100.00% <100.00%> (ø)
src/fillbroadcast.jl 100.00% <100.00%> (ø)
src/oneelement.jl 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@jishnub jishnub marked this pull request as draft October 19, 2023 14:32
@putianyi889
Copy link
Contributor

putianyi889 commented Oct 19, 2023

Can you use === to check if the types are consistent?

@jishnub
Copy link
Member Author

jishnub commented Oct 20, 2023

Looks like InfiniteLinearAlgebra is depending on the incorrect behaviour through BlockBandedMatrices, perhaps inadvertently.

@dlfivefifty
Copy link
Member

It looks like downstream breakage is extensive. I believe you that these packages might be depending on buggy behaviour but we should fix them before merging this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants