-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
Codecov Report
@@ 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
Continue to review full report at Codecov.
|
src/multiplication.jl
Outdated
|
||
struct MultiplicationType{T} end | ||
|
||
getconfiguration() = config |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.)
src/multiplication.jl
Outdated
|
||
Cinf = setrounding(T, RoundDown) do | ||
for i in 1:n | ||
Cinf .+= min.(Ainf[:, i] * Binf[i, :]', |
There was a problem hiding this comment.
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
src/multiplication.jl
Outdated
|
||
Csup = setrounding(T, RoundUp) do | ||
for i in 1:n | ||
Csup .+= max.(Ainf[:, i] * Binf[i, :]', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
There was a problem hiding this 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.
No description provided.