-
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
Prepare for deprecation of ViewAllocateWithoutInitializing #3264
Prepare for deprecation of ViewAllocateWithoutInitializing #3264
Conversation
…:ViewCtorProp rather than an actual type
I had a peek at Trilinos and this PR would break
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, though like Damien says we should drop the named commit when we merge
Build before dropping the commit log is here I added a unit test anyway. |
a28630a
to
04c883c
Compare
Thoroughly looked through the changes. Looks good to me. |
Beginning with kokkos/3.3, ViewAllocateWithoutInitializing becomes an alias to a specialization of ViewCtorProp taking a string as ctor argument, kokkos/kokkos#3264. These changes result in removal of the "label" member of the former ViewAllocateWithoutInitializing struct stokhos/src/sacado/kokkos/pce/KokkosExp_View_UQ_PCE_Contiguous.hpp contains a make_view overload that required the label member from the ViewAllocateWithoutInitializing struct; this PR makes a change for updated compatibility
Beginning with kokkos/3.3, ViewAllocateWithoutInitializing becomes an alias to a specialization of ViewCtorProp taking a string as ctor argument, kokkos/kokkos#3264. These changes result in removal of the "label" member of the former ViewAllocateWithoutInitializing struct stokhos/src/sacado/kokkos/pce/KokkosExp_View_UQ_PCE_Contiguous.hpp contains a make_view overload that required the label member from the ViewAllocateWithoutInitializing struct; this PR makes a change for updated compatibility
Beginning with kokkos/3.3, ViewAllocateWithoutInitializing becomes an alias to a specialization of ViewCtorProp taking a string as ctor argument, kokkos/kokkos#3264. These changes result in removal of the "label" member of the former ViewAllocateWithoutInitializing struct stokhos/src/sacado/kokkos/pce/KokkosExp_View_UQ_PCE_Contiguous.hpp contains a make_view overload that required the label member from the ViewAllocateWithoutInitializing struct; this PR makes a change for updated compatibility
Per comment in the code,
ViewAllocateWithoutInitializing
was there only for backward compatibility. Moving away from it allows us to get rid of twoView
constructor overloads*.Admittedly the changes I propose would break code that relied onKokkos::ViewAllocateWithoutInitializing
being an actual type but I think it is ok.I considered adding an implicit conversion from
ViewAllocateWithoutInitializing
toImpl::ViewCtorProp<std::string,Impl::WithoutInitializing_t>
because that solution would be safer for code downstream. In fact, it was originally my plan but it turned out to be harder than I thought. I managed to implement it with the help from @nliber but it forced me to change all the overloads that tookImpl::ViewCtorProp<P...>
and I ended dropping the idea because the complexity added was not worth it.You will notice I haven't actually yet deprecated the use of
ViewAllocateWithoutInitializing
. My intent is to make sure we remove it from all examples and tutorials and perform the deprecation later. Hopefully by then we will be able to use the deprecated attribute from C++14.TLDR Make
ViewAllocateWithoutInitializing
afunction that generates aan alias in preparation for deprecation/removal.Impl::ViewCtorProp
rather a concrete type*Don't worry we still have 14 besides besides the special members!