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

Start support for array sum optimisation #237

Closed
wants to merge 14 commits into from
Closed

Conversation

richfitz
Copy link
Member

This PR adds support for an alternative way of writing out partial sums (i.e., creating a lower dimensional tensor from a higher dimensional one by summing over some dimensions).

Currently supports expressions that can be factorised as addition of a series of terms which may or may not include partial sums.

  • Implement support for subtraction
  • Implement R code generation (?)
  • Test for unary minus
  • Test for impossible sums (just add parens, incomplete sums)
  • Are our variable dependencies ok?

Fixes #235

@codecov
Copy link

codecov bot commented Aug 19, 2021

Codecov Report

Merging #237 (9373934) into master (b209499) will decrease coverage by 0.23%.
The diff coverage is 93.88%.

Impacted file tree graph

@@             Coverage Diff             @@
##            master     #237      +/-   ##
===========================================
- Coverage   100.00%   99.76%   -0.24%     
===========================================
  Files           39       39              
  Lines         4430     4594     +164     
===========================================
+ Hits          4430     4583     +153     
- Misses           0       11      +11     
Impacted Files Coverage Δ
R/generate_c_equation.R 99.11% <90.32%> (-0.89%) ⬇️
R/ir_parse_arrays.R 98.65% <92.92%> (-1.35%) ⬇️
R/generate_c_sexp.R 100.00% <100.00%> (ø)
R/ir_parse.R 100.00% <100.00%> (ø)
R/ir_serialise.R 100.00% <100.00%> (ø)
R/odin_options.R 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 8c9dff7...9373934. Read the comment docs.

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.

Better handling of partial sums
1 participant