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

Improve TransposeView by exposing operations for sizing and indexing #3891

Merged
merged 4 commits into from
Mar 11, 2024

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented Mar 9, 2024

Note that this makes heavy use of concepts, so we'll have to see if Clang is happy with it.

Contributes to #3302.

@pleroy pleroy changed the title Improved TransposeView by exposing operations for sizing and indexing Improve TransposeView by exposing operations for sizing and indexing Mar 9, 2024

template<typename T>
concept unbounded = requires(T& t) {
{ t.size() } -> std::same_as<int>;
Copy link
Member

Choose a reason for hiding this comment

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

I could imagine adding size to the fixed types, just like std::array has a size.

Copy link
Member Author

@pleroy pleroy Mar 9, 2024

Choose a reason for hiding this comment

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

Hmm, actually they have size, rows and columns. So I don't even need the unbounded concept, which is good because we want to handle fixed and unbounded similarly if possible.

Note that size probably doesn't make much sense for matrices, so I'll remove it ultimately.

@eggrobin eggrobin added the LGTM label Mar 11, 2024
@pleroy pleroy merged commit 08226d8 into mockingbirdnest:master Mar 11, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants