-
Notifications
You must be signed in to change notification settings - Fork 94
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 sized ctor and public add_operator to Combination #1771
base: develop
Are you sure you want to change the base?
Conversation
Can you describe a use case for this? Combination creation is pretty lightweight, so I am hesitant to add more complexity there. |
37353b3
to
1435c66
Compare
Sure and maybe there is a better way to do it. On the OGL side I have
but there are cases (after repartitioning) where |
Making the empty case work seems sensible, except for the fact that we don't have anything to base the size on then. BTW ctr is kind of a misleading abbreviation, it could be counter or constructor. |
@@ -112,6 +112,7 @@ class Combination : public EnableLinOp<Combination<ValueType>>, | |||
add_operators(std::forward<Rest>(rest)...); | |||
} | |||
|
|||
protected: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @upsj that we should not expose this member. I think it would be enough to add a constructor, which takes the iterators, and just an dimension as an extra parameter. Then you could build the linop from that parameter, and just check that the operator dimensions match up.
37009e7
to
6b90223
Compare
6b90223
to
3727e02
Compare
Error: The following files need to be formatted:
You can find a formatting patch under Artifacts here or run |
This PR makes the
Combination::add_operators
member public so that operators can be added after constructing a combination matrix. Additionally, a new constructor is added so that an empty combination can be created first and additional operators are added later.