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

Improve handling of isometric expansion when collapsing sparsity. #62

Merged
merged 7 commits into from
Jun 16, 2023

Conversation

LTLA
Copy link
Member

@LTLA LTLA commented Jun 14, 2023

There are several decisions that need to be made depending on:

  1. Whether the operation preserves sparsity.
  2. If it doesn't preserve sparsity, whether the zero operation is constant.
  3. Whether the underlying matrix is sparse.
  4. Whether a sparse extraction was requested.

The operation always needs to define dense() methods for a pointer with block and index extraction.

If either of 1 or 2 is true, the operation should define a dense() method that takes a SparseRange, and a sparse() method that takes a SparseRange.

If 3 is false, we call the dense() methods for a pointer with block and index extraction.

If 3 is true and 1 is true, we call the sparse() method (even if dense output was requested).

If 3 is true and 1 is false and 2 is true, we call dense() on the SparseRange.

If 3 is true and 1 is false and 2 is false, we call dense() on the pointers.

@codecov-commenter
Copy link

codecov-commenter commented Jun 16, 2023

Codecov Report

Merging #62 (dd4fb4a) into master (1b56d67) will decrease coverage by 0.12%.
The diff coverage is 91.30%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

@@            Coverage Diff             @@
##           master      #62      +/-   ##
==========================================
- Coverage   95.11%   94.99%   -0.12%     
==========================================
  Files         102      102              
  Lines        9230     9318      +88     
  Branches      155      160       +5     
==========================================
+ Hits         8779     8852      +73     
- Misses        369      379      +10     
- Partials       82       87       +5     
Impacted Files Coverage Δ
include/tatami/isometric/arith_utils.hpp 100.00% <ø> (ø)
include/tatami/isometric/unary/math_helpers.hpp 95.91% <82.60%> (-4.09%) ⬇️
...tatami/isometric/unary/DelayedUnaryIsometricOp.hpp 94.44% <92.66%> (-1.91%) ⬇️
include/tatami/isometric/unary/arith_helpers.hpp 98.14% <100.00%> (+0.14%) ⬆️
include/tatami/isometric/unary/boolean_helpers.hpp 100.00% <100.00%> (ø)
include/tatami/isometric/unary/compare_helpers.hpp 100.00% <100.00%> (ø)
tests/src/isometric/unary/math_helpers.cpp 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

@LTLA LTLA merged commit 9e60425 into master Jun 16, 2023
@LTLA LTLA deleted the better-expanded branch June 16, 2023 21:51
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