Jutho / TensorOperations.jl

Julia package for tensor contractions and related operations
https://jutho.github.io/TensorOperations.jl/stable/
Other
438 stars 55 forks source link

Refactor branching on `α` and `β` #146

Closed lkdvos closed 10 months ago

lkdvos commented 10 months ago

This pull request simplifies some implementations that are checking for dynamic zeros/ones, in favor of only special-casing the statically known ones and letting the compiler const-propagate the rest.

codecov[bot] commented 10 months ago

Codecov Report

Merging #146 (b8221e6) into master (a58aac1) will increase coverage by 0.37%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #146      +/-   ##
==========================================
+ Coverage   81.17%   81.55%   +0.37%     
==========================================
  Files          25       25              
  Lines        2189     2152      -37     
==========================================
- Hits         1777     1755      -22     
+ Misses        412      397      -15     
Files Changed Coverage Δ
ext/TensorOperationscuTENSORExt.jl 0.00% <ø> (ø)
src/implementation/abstractarray.jl 100.00% <ø> (ø)
ext/TensorOperationsChainRulesCoreExt.jl 100.00% <100.00%> (ø)
src/TensorOperations.jl 100.00% <100.00%> (ø)
src/implementation/diagonal.jl 100.00% <100.00%> (ø)
src/implementation/strided.jl 97.10% <100.00%> (+7.16%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

Jutho commented 10 months ago

Looks great. Should we try to resolve the type piracy and update StridedViews.jl (I would put it there rather than in Strided.jl)? Or do we leave that for another time?