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

resolve conjugation flags in strided implementations #190

Merged
merged 4 commits into from
Oct 4, 2024
Merged

Conversation

Jutho
Copy link
Owner

@Jutho Jutho commented Oct 3, 2024

Possible implementation to resolve all conjugation flags by adding them to the StridedView construction phase, before the actual strided implementation is defined. I think the resulting code is actually somewhat cleaner as well. Comments are welcome, in particular from @lkdvos and @leburgel .

Copy link
Collaborator

@lkdvos lkdvos left a comment

Choose a reason for hiding this comment

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

I think this does look good indeed, I'm happy that it's non-breaking too!

I would maybe add a comment before the if-splits explaining that it is type-stability thing, and as a reminder to not get rid of them.

Also, could you maybe double-check that the flag2op function was not being used in the extensions, or in tensorkit before removing it? Technically it has never been indicated as public API so we can remove it without having a breaking version, but it might be a useful function to have anyways.

@Jutho
Copy link
Owner Author

Jutho commented Oct 3, 2024

That's quick :-).
It's not used in the extensions, but I will indeed check TensorKit.

Unfortunately, the problem is not yet solved, since now makeblascontractable is type-unstable. It either returns the original StridedView, with the conjugation flag already in there, or it creates a new permuted copy, that is then not conjugated. However, that can be worked around by also making the new copy inherit the conjugation flag of the original one, so there will be another commit.

@leburgel
Copy link
Contributor

leburgel commented Oct 4, 2024

Tried it out quickly on the original problem, looks perfect to me. Thanks for the quick fix!

@Jutho Jutho merged commit 427403e into master Oct 4, 2024
15 checks passed
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.

3 participants