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

Extend copytrito! for a sparse source #533

Merged
merged 3 commits into from
Apr 15, 2024
Merged

Extend copytrito! for a sparse source #533

merged 3 commits into from
Apr 15, 2024

Conversation

jishnub
Copy link
Collaborator

@jishnub jishnub commented Apr 14, 2024

julia> S = sprand(100, 100, 0.01);

julia> M = zeros(size(S));

julia> @btime copytrito!($M, $S, 'U');
  20.779 μs (0 allocations: 0 bytes) # main
  2.050 μs (0 allocations: 0 bytes) # this PR

Copy link

codecov bot commented Apr 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.10%. Comparing base (33fbc75) to head (16076cd).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #533      +/-   ##
==========================================
+ Coverage   76.42%   84.10%   +7.67%     
==========================================
  Files          12       12              
  Lines        8969     9020      +51     
==========================================
+ Hits         6855     7586     +731     
+ Misses       2114     1434     -680     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

row = rv[i]
(uplo == 'U' && row <= col) || (uplo == 'L' && row >= col) || continue
v = nz[i]
M[row, col] = v
Copy link
Member

@ViralBShah ViralBShah Apr 15, 2024

Choose a reason for hiding this comment

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

Maybe just make it M[row,col] = nz[i]?

@ViralBShah
Copy link
Member

Looks straightforward. Please merge when ready.

@jishnub jishnub merged commit 4606755 into main Apr 15, 2024
9 checks passed
@jishnub jishnub deleted the jishnub/copytrito branch April 15, 2024 14:40
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.

2 participants