Skip to content

[mdspan.layout.left.cons] Fix typo in Precondition.#8210

Closed
1uc wants to merge 1 commit into
cplusplus:mainfrom
1uc:left_from_left_padded
Closed

[mdspan.layout.left.cons] Fix typo in Precondition.#8210
1uc wants to merge 1 commit into
cplusplus:mainfrom
1uc:left_from_left_padded

Conversation

@1uc

@1uc 1uc commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

Here other is a layout mapping and layout mappings don't have this API to access the ith extent. They only have extents() to get the std::extents object. See,

\tcode{other.extents().extent(extents_type::rank() - 1)}.

for the analogous statement in layout_right.

@1uc

1uc commented Sep 4, 2025

Copy link
Copy Markdown
Contributor Author

CI says, that now a line is too long. In hindsight, that does seem very likely, I'll fix it.

Here `other` is a layout mapping and layout mappings don't have this API
to access the `i`th extent. They only have `extents()` to get the
std::extents object.
@1uc 1uc force-pushed the left_from_left_padded branch from 7b9c957 to 743d833 Compare September 26, 2025 12:13
@1uc

1uc commented Sep 26, 2025

Copy link
Copy Markdown
Contributor Author

I've add the affected section to the commit message and added the \newline. The affected page has been attached it's (11.1).

p1138.pdf

@1uc 1uc changed the title Typo layout_left::mapping::mapping precondition. [mdspan.layout.left.cons] Typo layout_left::mapping::mapping precondition. Sep 26, 2025
@1uc 1uc changed the title [mdspan.layout.left.cons] Typo layout_left::mapping::mapping precondition. [mdspan.layout.left.cons] Fix typo in Precondition. Sep 26, 2025

@jwakely jwakely left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The wording fix is correct. I have no particular opinion on whether that's the right way to break the line or not, but it seems OK.

@1uc

1uc commented Sep 26, 2025

Copy link
Copy Markdown
Contributor Author

I didn't know where to break so I searched the rest of the document; and I found a case where it broke this way.

Comment thread source/containers.tex
\item
If \tcode{extents_type::rank() > 1} is \tcode{true},
then \tcode{other.stride(1)} equals \tcode{other.extents(0)}.
then \tcode{other.stride(1)} equals \tcode{other.extents().\newline extent(0)}.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we hyphenate "extents" instead (with \-)?

@tkoeppe tkoeppe added the changes requested Changes to the wording or approach have been requested and not yet applied. label Nov 5, 2025
@eisenwave eisenwave added the P1-Important Misapplication of paper, malformed code, internal inconsistencies label Nov 6, 2025
@eisenwave

This comment was marked as resolved.

@tkoeppe

tkoeppe commented Nov 10, 2025

Copy link
Copy Markdown
Contributor

I took and applied this change as 2a7f36a. Thank you!

@tkoeppe tkoeppe closed this Nov 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changes requested Changes to the wording or approach have been requested and not yet applied. P1-Important Misapplication of paper, malformed code, internal inconsistencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants