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 new c'tors to LinExpr #36

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Add new c'tors to LinExpr #36

wants to merge 8 commits into from

Conversation

hedtke
Copy link
Collaborator

@hedtke hedtke commented Jan 27, 2025

Add new c'tors to LinExpr to speed-up the creation of expressions with multiple variables.

Fixes #32

This is an alternative implementation of #34

@hedtke hedtke mentioned this pull request Jan 27, 2025
@hedtke hedtke added this to the 1.3.0 milestone Jan 27, 2025
Copy link

codecov bot commented Jan 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.13%. Comparing base (d9061e8) to head (cc0472d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #36      +/-   ##
==========================================
+ Coverage   95.62%   96.13%   +0.50%     
==========================================
  Files          10       10              
  Lines         183      207      +24     
  Branches       48       59      +11     
==========================================
+ Hits          175      199      +24     
  Misses          3        3              
  Partials        5        5              
Files with missing lines Coverage Δ
include/scippp/lin_expr.hpp 100.00% <100.00%> (ø)
source/lin_expr.cpp 100.00% <100.00%> (ø)

@hedtke hedtke self-assigned this Jan 27, 2025
@hedtke hedtke requested a review from TiloW January 27, 2025 14:09
@hedtke
Copy link
Collaborator Author

hedtke commented Jan 27, 2025

@TonyCongqianWang you might want to have a look into this

@TonyCongqianWang
Copy link

I'll try to do it tomorrow!

Copy link

@TonyCongqianWang TonyCongqianWang left a comment

Choose a reason for hiding this comment

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

Looks good to me. Not having spans should not be a big drawback since copying variables is not going to be very expensive. Using std::vector should allow enough flexibility for most use cases

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.

Accelerate summation of variables
2 participants