//@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 #include #include namespace { template void test_empty_view_runtime_unmanaged() { T d{}; auto* p = reinterpret_cast(0xABADBABE); (void)Kokkos::View(p); (void)Kokkos::View(&d); (void)Kokkos::View(nullptr); (void)Kokkos::View(NULL); // NOLINT(modernize-use-nullptr) (void)Kokkos::View(0); // NOLINT(modernize-use-nullptr) (void)Kokkos::View(p, 0); (void)Kokkos::View(&d, 0); (void)Kokkos::View(nullptr, 0); (void)Kokkos::View(NULL, 0); // NOLINT(modernize-use-nullptr) (void)Kokkos::View(0, 0); // NOLINT(modernize-use-nullptr) (void)Kokkos::View(p, 0, 0); (void)Kokkos::View(&d, 0, 0); (void)Kokkos::View(nullptr, 0, 0); (void)Kokkos::View(NULL, 0, 0); // NOLINT(modernize-use-nullptr) (void)Kokkos::View(0, 0, 0); // NOLINT(modernize-use-nullptr) } TEST(TEST_CATEGORY, view_empty_runtime_unmanaged) { test_empty_view_runtime_unmanaged(); test_empty_view_runtime_unmanaged(); test_empty_view_runtime_unmanaged(); test_empty_view_runtime_unmanaged(); test_empty_view_runtime_unmanaged(); } } // namespace