-
Notifications
You must be signed in to change notification settings - Fork 69
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
Implement to_mdspan #244
Comments
@jefffaust Thanks for your interest! The mdarray class template requires that the container be contiguous. deque is not a contiguous container. The main benefit of deque is that insertion or deletion at its beginning or end does not invalidate pointers or references to the other elements. However, mdarray cannot be resized after creation, so this benefit does not apply. One could write a custom mdspan accessor to view the elements of a deque. |
I was afraid of that. The other benefit of deque, and the reason I'd like
to use it, is that it can hold much larger sets of data.
My workaround is a vector of 2d mdarray, instead of a 3d mdarray, which
makes a lot of sense for my case.
Also wanted to let you know, we're getting a lot of benefit from mdspan and
mdarray.
Thanks,
Jeff
…On Wed, Mar 8, 2023, 8:12 AM Mark Hoemmen ***@***.***> wrote:
@jefffaust <https://github.com/jefffaust> Thanks for your interest! The
mdarray class template requires that the container be contiguous. deque is
not a contiguous container.
The main benefit of deque is that insertion or deletion at its beginning
or end does not invalidate pointers or references to the other elements.
However, mdarray cannot be resized after creation, so this benefit does not
apply.
One could write a custom mdspan accessor to view the elements of a deque.
—
Reply to this email directly, view it on GitHub
<#244 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFMO4FCQHM2UULGNKCJD5BTW3CVVZANCNFSM6AAAAAAVTCK6K4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@jefffaust wrote:
We're delighted to hear that! Thank you for the feedback! : - ) Regarding mdarray requiring a contiguous container: the general principle is that views are more general than containers. |
The sequential implementation of triangular_matrix_matrix_solve for the lower triangular, right side case had a j loop that was counting in the wrong direction: up, instead of down. This commit fixes that, and adds a regression test. The test also uncovered a compilation bug that this commit fixes. Fixes kokkos#244.
This proposal describes to_mdspan.
I would find this quite useful, especially if it would work when dequeu is the underlying mdarray container.
The text was updated successfully, but these errors were encountered: