//@HEADER // ************************************************************************ // // Kokkos v. 4.0 // Copyright (2022) National Technology & Engineering // Solutions of Sandia, LLC (NTESS). // // Under the terms of Contract DE-NA0003525 with NTESS, // the U.S. Government retains certain rights in this software. // // Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions. // See https://kokkos.org/LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //@HEADER #ifndef KOKKOS_EXPERIMENTAL_VIEWUNIFORMTYPE_HPP #define KOKKOS_EXPERIMENTAL_VIEWUNIFORMTYPE_HPP #include namespace Kokkos { namespace Impl { template struct ViewScalarToDataType { using type = typename ViewScalarToDataType::type *; }; template struct ViewScalarToDataType { using type = ScalarType; }; template struct ViewUniformLayout { using array_layout = LayoutType; }; template struct ViewUniformLayout { using array_layout = Kokkos::LayoutLeft; }; template <> struct ViewUniformLayout { using array_layout = Kokkos::LayoutLeft; }; template struct ViewUniformType { using data_type = typename ViewType::data_type; using const_data_type = std::add_const_t; using runtime_data_type = typename ViewScalarToDataType::type; using runtime_const_data_type = typename ViewScalarToDataType< std::add_const_t, ViewType::rank>::type; using array_layout = typename ViewUniformLayout::array_layout; using device_type = typename ViewType::device_type; using anonymous_device_type = typename Kokkos::Device; using memory_traits = typename Kokkos::MemoryTraits; using type = Kokkos::View; using const_type = Kokkos::View; using runtime_type = Kokkos::View; using runtime_const_type = Kokkos::View; using nomemspace_type = Kokkos::View; using const_nomemspace_type = Kokkos::View; using runtime_nomemspace_type = Kokkos::View; using runtime_const_nomemspace_type = Kokkos::View; }; } // namespace Impl } // namespace Kokkos #endif