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

add allowscalar #200

Merged
merged 7 commits into from
Aug 7, 2022
Merged

add allowscalar #200

merged 7 commits into from
Aug 7, 2022

Conversation

SobhanMP
Copy link
Member

@SobhanMP SobhanMP commented Jul 28, 2022

closes #189

the only downside is that revise might act a bit weird.

also maybe RCI should call @eval on exp direclty instead of returning exp?

another detail is that should this also block stuff like

A = sprandn(100, 100, 0.1)
A[i, :]
A[1:10, :]

or just the ones i marked?

This does NOT cause any degradation in any way, unlike adding a state variable.

@codecov-commenter
Copy link

codecov-commenter commented Jul 28, 2022

Codecov Report

Merging #200 (782144e) into main (134f67a) will increase coverage by 0.27%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #200      +/-   ##
==========================================
+ Coverage   91.85%   92.13%   +0.27%     
==========================================
  Files          11       11              
  Lines        7118     7167      +49     
==========================================
+ Hits         6538     6603      +65     
+ Misses        580      564      -16     
Impacted Files Coverage Δ
src/abstractsparse.jl 44.44% <100.00%> (+13.40%) ⬆️
src/sparsematrix.jl 95.33% <100.00%> (+0.04%) ⬆️
src/sparsevector.jl 95.60% <100.00%> (+1.42%) ⬆️
src/solvers/spqr.jl 88.31% <0.00%> (-1.03%) ⬇️
src/solvers/cholmod.jl 90.66% <0.00%> (-0.02%) ⬇️
src/linalg.jl 84.50% <0.00%> (ø)
src/SparseArrays.jl 100.00% <0.00%> (ø)
src/higherorderfns.jl 96.66% <0.00%> (+0.11%) ⬆️
src/solvers/umfpack.jl 88.30% <0.00%> (+0.14%) ⬆️
... and 1 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

@rayegun
Copy link
Member

rayegun commented Jul 28, 2022

You mean it causes a 2% slow down?

@SobhanMP
Copy link
Member Author

SobhanMP commented Jul 28, 2022

no it does not, Chris said that adding a flag for scalar (with a global const scalar = Ref{Bool}(true)) would cause a 2% slowdown. this does not do that. This should cause NO runtime overhead. That's the whole goal of having a macro that restores the function (and delete it), every thing happens at compile time.

@SobhanMP SobhanMP requested a review from ViralBShah July 31, 2022 21:42
@rayegun
Copy link
Member

rayegun commented Jul 31, 2022

Are we doing both the static type and the macro?

@SobhanMP
Copy link
Member Author

SobhanMP commented Jul 31, 2022

what static type? FixedSCS? yeah.

@SobhanMP SobhanMP requested review from rayegun and removed request for ViralBShah and rayegun August 3, 2022 14:23
@SobhanMP
Copy link
Member Author

SobhanMP commented Aug 7, 2022

bump

@ViralBShah
Copy link
Member

ViralBShah commented Aug 7, 2022

Was waiting on the update in base to go through.

I think the allowscalar API should be documented and marked experimental (and not exported). Implementation looks good.

@SobhanMP SobhanMP merged commit 090474b into main Aug 7, 2022
@SobhanMP SobhanMP deleted the smp/scalar_off branch August 7, 2022 23:14
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.

Ability to turn on and off scalar indexing for sparse matrices?
4 participants