Sacado: Remove calls to deprecated Kokkos::View methods
Created by: mhoemmen
Kokkos will soon deprecate the following Kokkos::View methods:
-
ptr_on_device()
: replace withdata()
-
dimension(N)
(for N = 0, 1, 2, ..., 7): replace withextent(N)
-
dimension_N()
(for N = 0, 1, 2, ..., 7): replace withextent(N)
-
is_contiguous()
: replace withspan_is_contiguous()
-
capacity()
: replace withspan()
Sierra is already seeing build errors with its Trilinos integration build, since Sierra doesn't define KOKKOS_ENABLE_DEPRECATED_CODE
. If that macro is not defined, code that uses the above methods will not build.
I tried straightforwardly replacing ptr_on_device
with data
and dimension_N
with extent(N)
, but got build errors like this:
.../Trilinos/packages/sacado/src/KokkosExp_View_Fad.hpp:1073:19: error: ‘Kokkos::Impl::ViewMapping<Kokkos::ViewTraits<Sacado::Fad::SFad<Sacado::Fad::SFad<double, 3>, 5>**, Kokkos::LayoutLeft, Kokkos::OpenMP>, void>::offset_type’ has no member named ‘extent’
( Rank == 0 ? m_offset.extent(0) :
The m_offset
instance field is a ViewMapping
specialization. I'm curious if Kokkos::View
's internals have since moved on from an implementation detail, upon which the Sacado specialization of Kokkos::View
depends.
@trilinos/sacado @micahahoward @rrdrake @prwolfe @etphipp