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

fast interval matrix multiplication #52

Merged
merged 4 commits into from Aug 10, 2021
Merged

fast interval matrix multiplication #52

merged 4 commits into from Aug 10, 2021

Conversation

lucaferranti
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Jul 22, 2021

Codecov Report

Merging #52 (7f3bbf2) into main (123f0d5) will increase coverage by 0.44%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #52      +/-   ##
==========================================
+ Coverage   96.66%   97.11%   +0.44%     
==========================================
  Files          10       11       +1     
  Lines         270      312      +42     
==========================================
+ Hits          261      303      +42     
  Misses          9        9              
Impacted Files Coverage Δ
src/IntervalLinearAlgebra.jl 100.00% <100.00%> (ø)
src/multiplication.jl 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 123f0d5...7f3bbf2. Read the comment docs.


struct MultiplicationType{T} end

getconfiguration() = config
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this name. Suggestions for better ones?

Maybe just one macro @configmul to change the multiplication mode, (e.g. @configmul fast) that can also be used to just print the current configuration if called without arguments.

I now abbreviations in names are not ideal, but I think the name should stay short

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getconfiguration is too general? Perhaps rename to get_multiplication_mode and set_multiplication_mode (note that I used "mode" instead of "type" since "type" somehow related to the notion in the Julia type system which is unrelated here).

(IMO it is not really an issue that "names are long" when they contribute to communicating precisely the purpose of the function. With auto-completion tools etc, it shouldn't matter too much if it is 5 or 10 characters. And in downstream applications these functions might be called only once. Also note the use of underscores, I think that helps here.)

@lucaferranti lucaferranti mentioned this pull request Jul 25, 2021
10 tasks

Cinf = setrounding(T, RoundDown) do
for i in 1:n
Cinf .+= min.(Ainf[:, i] * Binf[i, :]',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lines 83-86 allocate temporary arrays, consider using views


Csup = setrounding(T, RoundUp) do
for i in 1:n
Csup .+= max.(Ainf[:, i] * Binf[i, :]',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Collaborator

@mforets mforets left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice 🎉

I left two comments, one of them is just about perf, the other one is about multiplication modes' names. Both can be addressed as follow-up PRs, this is ready to merge from my side.

@lucaferranti lucaferranti merged commit 16777af into main Aug 10, 2021
@lucaferranti lucaferranti deleted the lf/mul branch August 10, 2021 07:43
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.

None yet

3 participants