From 1d427ec44902b07fdb0b85c9f74ca1376c5a0f3e Mon Sep 17 00:00:00 2001 From: Yuuichi Asahi Date: Wed, 15 Jan 2025 18:26:38 +0900 Subject: [PATCH] remove unnecessary changes --- fft/src/KokkosFFT_Core.cpp | 79 -------------------------------- fft/src/KokkosFFT_Core.hpp | 17 ------- fft/src/KokkosFFT_Cuda_types.hpp | 2 - fft/src/KokkosFFT_HIP_types.hpp | 2 - fft/src/KokkosFFT_ROCM_types.hpp | 2 - fft/src/KokkosFFT_SYCL_types.hpp | 2 - 6 files changed, 104 deletions(-) delete mode 100644 fft/src/KokkosFFT_Core.cpp delete mode 100644 fft/src/KokkosFFT_Core.hpp diff --git a/fft/src/KokkosFFT_Core.cpp b/fft/src/KokkosFFT_Core.cpp deleted file mode 100644 index 36e5d63a..00000000 --- a/fft/src/KokkosFFT_Core.cpp +++ /dev/null @@ -1,79 +0,0 @@ -// SPDX-FileCopyrightText: (C) The kokkos-fft development team, see COPYRIGHT.md file -// -// SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception - -#include -#include "KokkosFFT_Core.hpp" -#include "KokkosFFT_default_types.hpp" - -namespace { -bool g_is_initialized = false; -bool g_is_finalized = false; - -bool kokkosfft_initialize_was_called() { - return KokkosFFT::is_initialized() || KokkosFFT::is_finalized(); -} -bool kokkosfft_finalize_was_called() { return KokkosFFT::is_finalized(); } - -void initialize_internal() { - KokkosFFT::Impl::initialize_host(); - KokkosFFT::Impl::initialize_device(); -} - -void finalize_internal() { - KokkosFFT::Impl::finalize_host(); - KokkosFFT::Impl::finalize_device(); -} -} // namespace - -[[nodiscard]] bool KokkosFFT::is_initialized() noexcept { - return g_is_initialized; -} - -[[nodiscard]] bool KokkosFFT::is_finalized() noexcept { return g_is_finalized; } - -void KokkosFFT::initialize() { - if (!(Kokkos::is_initialized() || Kokkos::is_finalized())) { - Kokkos::abort( - "Error: KokkosFFT::initialize() must not be called before initializing " - "Kokkos.\n"); - } - if (Kokkos::is_finalized()) { - Kokkos::abort( - "Error: KokkosFFT::initialize() must not be called after finalizing " - "Kokkos.\n"); - } - if (kokkosfft_initialize_was_called()) { - Kokkos::abort( - "Error: KokkosFFT::initialize() has already been called." - " KokkosFFT can be initialized at most once.\n"); - } - initialize_internal(); - g_is_initialized = true; -} - -void KokkosFFT::finalize() { - if (!(Kokkos::is_initialized() || Kokkos::is_finalized())) { - Kokkos::abort( - "Error: KokkosFFT::finalize() may only be called after Kokkos has been " - "initialized.\n"); - } - if (Kokkos::is_finalized()) { - Kokkos::abort( - "Error: KokkosFFT::finalize() must be called before finalizing " - "Kokkos.\n"); - } - - if (!kokkosfft_initialize_was_called()) { - Kokkos::abort( - "Error: KokkosFFT::finalize() may only be called after KokkosFFT has " - "been " - "initialized.\n"); - } - if (kokkosfft_finalize_was_called()) { - Kokkos::abort("Error: KokkosFFT::finalize() has already been called.\n"); - } - finalize_internal(); - g_is_initialized = false; - g_is_finalized = true; -} diff --git a/fft/src/KokkosFFT_Core.hpp b/fft/src/KokkosFFT_Core.hpp deleted file mode 100644 index d1d5d60b..00000000 --- a/fft/src/KokkosFFT_Core.hpp +++ /dev/null @@ -1,17 +0,0 @@ -// SPDX-FileCopyrightText: (C) The kokkos-fft development team, see COPYRIGHT.md file -// -// SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception - -#ifndef KOKKOSFFT_CORE_HPP -#define KOKKOSFFT_CORE_HPP - -namespace KokkosFFT { -void initialize(); - -[[nodiscard]] bool is_initialized() noexcept; -[[nodiscard]] bool is_finalized() noexcept; - -void finalize(); -} // namespace KokkosFFT - -#endif diff --git a/fft/src/KokkosFFT_Cuda_types.hpp b/fft/src/KokkosFFT_Cuda_types.hpp index 88b5c9d7..f5a1fe62 100644 --- a/fft/src/KokkosFFT_Cuda_types.hpp +++ b/fft/src/KokkosFFT_Cuda_types.hpp @@ -238,9 +238,7 @@ template auto direction_type(Direction direction) { return direction == Direction::forward ? CUFFT_FORWARD : CUFFT_INVERSE; } - #endif - } // namespace Impl } // namespace KokkosFFT diff --git a/fft/src/KokkosFFT_HIP_types.hpp b/fft/src/KokkosFFT_HIP_types.hpp index cd233853..4be4d397 100644 --- a/fft/src/KokkosFFT_HIP_types.hpp +++ b/fft/src/KokkosFFT_HIP_types.hpp @@ -238,9 +238,7 @@ template auto direction_type(Direction direction) { return direction == Direction::forward ? HIPFFT_FORWARD : HIPFFT_BACKWARD; } - #endif - } // namespace Impl } // namespace KokkosFFT diff --git a/fft/src/KokkosFFT_ROCM_types.hpp b/fft/src/KokkosFFT_ROCM_types.hpp index b4b53aef..8bf19c07 100644 --- a/fft/src/KokkosFFT_ROCM_types.hpp +++ b/fft/src/KokkosFFT_ROCM_types.hpp @@ -363,9 +363,7 @@ template auto direction_type(Direction direction) { return direction == Direction::forward ? ROCFFT_FORWARD : ROCFFT_BACKWARD; } - #endif - } // namespace Impl } // namespace KokkosFFT diff --git a/fft/src/KokkosFFT_SYCL_types.hpp b/fft/src/KokkosFFT_SYCL_types.hpp index 05dfe6ec..9c6cb86b 100644 --- a/fft/src/KokkosFFT_SYCL_types.hpp +++ b/fft/src/KokkosFFT_SYCL_types.hpp @@ -225,9 +225,7 @@ template auto direction_type(Direction direction) { return direction == Direction::forward ? MKL_FFT_FORWARD : MKL_FFT_BACKWARD; } - #endif - } // namespace Impl } // namespace KokkosFFT