-
Notifications
You must be signed in to change notification settings - Fork 407
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
Add non-member Kokkos::resize/realloc for DualView #2170
Labels
Enhancement
Improve existing capability; will potentially require voting
Projects
Comments
There are kokkos_malloc, kokkos_free, and kokkos_realloc available as free functions in the Kokkos namespace, though they work on raw allocations and not Kokkos data structures. Kokkos::resize is possible for View, DualView, and UnorderedMap, not sure how realloc would be different from resize (unless realloc does not copy the data).
Cheers,
…--Dan S
From: Andrew Gaspar <notifications@github.com>
Reply-To: kokkos/kokkos <reply@reply.github.com>
Date: Wednesday, June 5, 2019 at 10:58 AM
To: kokkos/kokkos <kokkos@noreply.github.com>
Cc: Subscribed <subscribed@noreply.github.com>
Subject: [EXTERNAL] [kokkos/kokkos] Add non-member Kokkos::resize/realloc for DualView (#2170)
It would be nice if there were non-member Kokkos::resize and realloc functions to match Kokkos::View.
Slack discussion:
Andrew Gaspar [10:50 AM]
Could we get an overload of Kokkos::resize for DualView?
crtrott [10:54 AM]
It doesnt exist?
Andrew Gaspar [10:54 AM]
There’s member resize
crtrott [10:54 AM]
Oh maybe it got a member functiin
Yeah
Andrew Gaspar [10:55 AM]
but it would be nice for a couple reasons if it was non-member resize like View:
1. If you change a View to a DualView, you don’t have to change any resizes
2. Visually consistent in the code
crtrott [10:56 AM]
Agreed
Andrew Gaspar [10:56 AM]
I can file an issue
crtrott [10:56 AM]
Jup do that
Andrew Gaspar [10:57 AM]
I can see about providing the change myself
crtrott [10:57 AM]
Also realloc
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<#2170?email_source=notifications&email_token=ACBQOEVJSWAMBNQXVCTHLNDPY7WEPA5CNFSM4HT7P7SKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4GX2KLUQ>, or mute the thread<https://github.com/notifications/unsubscribe-auth/ACBQOEQDIIGR243GSBPF4L3PY7WEPANCNFSM4HT7P7SA>.
|
Yes resize preserves the existing data of the view while realloc does not. |
crtrott
added
the
Enhancement
Improve existing capability; will potentially require voting
label
Jun 5, 2019
@AndrewGaspar does PR #2408 address this? |
Looks right. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It would be nice if there were non-member
Kokkos::resize
andrealloc
functions to matchKokkos::View
.Slack discussion:
The text was updated successfully, but these errors were encountered: