cpp-proposals-pub icon indicating copy to clipboard operation
cpp-proposals-pub copied to clipboard

mdspan: layout_stride unnecessarily requires non-zero strides

Open dhollman opened this issue 6 years ago • 6 comments

There is no reason stride of 0 should be prohibited, but the current paper does.

dhollman avatar Aug 06 '19 18:08 dhollman

Making the change

—Dan S

On Aug 6, 2019, at 12:52 PM, David Hollman <[email protected]mailto:[email protected]> wrote:

There is no reason stride of 0 should be prohibited, but the current paper does.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/ORNL/cpp-proposals-pub/issues/111?email_source=notifications&email_token=ACBQOEUXXIYECDHGRESV2JDQDHB67A5CNFSM4IJZIMS2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HDWV57A, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACBQOETS7QRFSLU5O6ZPXADQDHB67ANCNFSM4IJZIMSQ.

dsunder avatar Aug 06 '19 20:08 dsunder

This is a functional change, so we should probably discuss it rather than changing it directly in the paper. I'm just making a list of things we want to change once we're out of wording and either into the working draft (in which case these will be papers suggesting changes) or back to LEWG (in which case we can just make some of these changes preemptively).

dhollman avatar Aug 06 '19 21:08 dhollman

Also, if this is changed, layout_stride::mapping::is_unique() layout_stride::mapping::is_always_unique() need to change.

dhollman avatar Aug 06 '19 21:08 dhollman

Since we already need to take the paper back to LEWG, I just added a question in editor font about allowing stride 0.

—Dan S

On Aug 6, 2019, at 3:05 PM, David Hollman <[email protected]mailto:[email protected]> wrote:

Also, if this is changed, layout_stride::mapping::is_unique() layout_stride::mapping::is_always_unique() need to change.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/ORNL/cpp-proposals-pub/issues/111?email_source=notifications&email_token=ACBQOEST5AZYTNGAVEHEIIDQDHRSTA5CNFSM4IJZIMS2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3WO4TA#issuecomment-518843980, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACBQOET4SCMBMPHVJHXIZODQDHRSTANCNFSM4IJZIMSQ.

dsunder avatar Aug 06 '19 21:08 dsunder

Well, if we're going to do that, there are about 10 other things in the previous 10 issues that need to be changed also

dhollman avatar Aug 07 '19 12:08 dhollman

I am against allowing stride 0 for layout_stride. In fact we discussed this at some point because there are libraries which allow this essentially for "broadcasting" a scalar value into a dimension. But there are serious downsides to making layout_stride not be always_unique. The always_unique property is very handy for telling me I can do a lot of things layout agnostic. For example "scale every element by 2". If always_unique is not true I need to figure out how the thing is non-unique, and run a different loop structure etc.

crtrott avatar Aug 07 '19 15:08 crtrott