From 686f4408f1af6038cd3d84ff95282ff4e45cfafe Mon Sep 17 00:00:00 2001 From: Lizzzka007 <gashchuk2011@mail.ru> Date: Sun, 22 Sep 2024 19:33:39 +0300 Subject: [PATCH] Code beauty fixes --- CMakeLists.txt | 4 ++++ includeCU/sfx_memory_processing.cuh | 2 +- includeCU/sfx_model_compute_subfunc.cuh | 4 ++-- includeCU/sfx_surface.cuh | 4 ++-- includeCXX/model_base.h | 2 +- includeCXX/sfx_call_class_func.h | 2 +- includeCXX/sfx_esm.h | 4 ++-- includeCXX/sfx_sheba.h | 4 ++-- srcC/sfx_call_cxx.c | 2 +- srcCU/sfx_esm.cu | 8 ++++---- srcCU/sfx_memory_processing.cu | 2 +- srcCU/sfx_sheba.cu | 8 ++++---- srcCXX/model_base.cpp | 6 +++--- srcCXX/sfx_call_class_func.cpp | 6 +++--- srcCXX/sfx_esm.cpp | 10 +++++----- srcCXX/sfx_memory_processing.cpp | 2 +- srcCXX/sfx_sheba.cpp | 10 +++++----- 17 files changed, 42 insertions(+), 38 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a01ab02..182a941 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -87,6 +87,7 @@ if(USE_CXX) set(HEADERS_C includeC/sfx_data.h ) + list(APPEND HEADERS_DIRS includeC/) set(SOURCES_CXX srcCXX/model_base.cpp @@ -104,6 +105,8 @@ if(USE_CXX) includeCXX/sfx_sheba.h includeCXX/sfx_call_class_func.h ) + list(APPEND HEADERS_DIRS includeCU/) + list(APPEND HEADERS_DIRS includeCXX/) endif(USE_CXX) if(INCLUDE_CUDA) @@ -149,6 +152,7 @@ endif(USE_CXX OR INCLUDE_CUDA) add_executable(sfx ${SOURCES}) set_property(TARGET sfx PROPERTY LINKER_LANGUAGE Fortran) target_include_directories(sfx PUBLIC ${CMAKE_BINARY_DIR}/modules/) +target_include_directories(sfx PUBLIC ${HEADERS_DIRS}) if(USE_CONFIG_PARSER) target_link_libraries(sfx config_parser_F config_parser_CXX) diff --git a/includeCU/sfx_memory_processing.cuh b/includeCU/sfx_memory_processing.cuh index c68c858..2e68b14 100644 --- a/includeCU/sfx_memory_processing.cuh +++ b/includeCU/sfx_memory_processing.cuh @@ -1,5 +1,5 @@ #pragma once -#include "../includeCXX/sfx_template_parameters.h" +#include "sfx_template_parameters.h" #include <cstddef> namespace memproc diff --git a/includeCU/sfx_model_compute_subfunc.cuh b/includeCU/sfx_model_compute_subfunc.cuh index 655555f..ecc53f2 100644 --- a/includeCU/sfx_model_compute_subfunc.cuh +++ b/includeCU/sfx_model_compute_subfunc.cuh @@ -1,6 +1,6 @@ #pragma once -#include "../includeC/sfx_data.h" -#include "../includeCU/sfx_math.cuh" +#include "sfx_data.h" +#include "sfx_math.cuh" template<typename T, class sfx_param> FUCNTION_DECLARATION_SPECIFIER void get_convection_lim(T &zeta_lim, T &Rib_lim, T &f_m_lim, T &f_h_lim, diff --git a/includeCU/sfx_surface.cuh b/includeCU/sfx_surface.cuh index 9cd6569..c2d6ebe 100644 --- a/includeCU/sfx_surface.cuh +++ b/includeCU/sfx_surface.cuh @@ -1,6 +1,6 @@ #pragma once -#include "../includeC/sfx_data.h" -#include "../includeCU/sfx_math.cuh" +#include "sfx_data.h" +#include "sfx_math.cuh" template<typename T> FUCNTION_DECLARATION_SPECIFIER void get_thermal_roughness(T &z0_t, T &B, diff --git a/includeCXX/model_base.h b/includeCXX/model_base.h index f51c7e7..2a3bb89 100644 --- a/includeCXX/model_base.h +++ b/includeCXX/model_base.h @@ -1,7 +1,7 @@ #pragma once #include <cstddef> #include "sfx_template_parameters.h" -#include "../includeC/sfx_data.h" +#include "sfx_data.h" template<typename T, MemType memIn, MemType memOut, MemType RunMem > class ModelBase diff --git a/includeCXX/sfx_call_class_func.h b/includeCXX/sfx_call_class_func.h index 0d79140..8cdb0a7 100644 --- a/includeCXX/sfx_call_class_func.h +++ b/includeCXX/sfx_call_class_func.h @@ -1,5 +1,5 @@ #pragma once -#include "../includeC/sfx_data.h" +#include "sfx_data.h" #ifdef __cplusplus extern "C" { diff --git a/includeCXX/sfx_esm.h b/includeCXX/sfx_esm.h index c1cc836..d404038 100644 --- a/includeCXX/sfx_esm.h +++ b/includeCXX/sfx_esm.h @@ -1,7 +1,7 @@ #pragma once #include "sfx_template_parameters.h" -#include "../includeCXX/model_base.h" -#include "../includeC/sfx_data.h" +#include "model_base.h" +#include "sfx_data.h" template<typename T, MemType memIn, MemType memOut, MemType RunMem > class FluxEsmBase : public ModelBase<T, memIn, memOut, RunMem> diff --git a/includeCXX/sfx_sheba.h b/includeCXX/sfx_sheba.h index ae9e7ff..33c93aa 100644 --- a/includeCXX/sfx_sheba.h +++ b/includeCXX/sfx_sheba.h @@ -1,7 +1,7 @@ #pragma once #include "sfx_template_parameters.h" -#include "../includeCXX/model_base.h" -#include "../includeC/sfx_data.h" +#include "model_base.h" +#include "sfx_data.h" template<typename T, MemType memIn, MemType memOut, MemType RunMem > class FluxShebaBase : public ModelBase<T, memIn, memOut, RunMem> diff --git a/srcC/sfx_call_cxx.c b/srcC/sfx_call_cxx.c index 506e464..208a8ed 100644 --- a/srcC/sfx_call_cxx.c +++ b/srcC/sfx_call_cxx.c @@ -1,6 +1,6 @@ #include <stdlib.h> #include <stdio.h> -#include "../includeCXX/sfx_call_class_func.h" +#include "sfx_call_class_func.h" // #include "../includeC/sfx_call_cxx.h" // -------------------------------------------------------------------------- // diff --git a/srcCU/sfx_esm.cu b/srcCU/sfx_esm.cu index 424383e..f8028d6 100644 --- a/srcCU/sfx_esm.cu +++ b/srcCU/sfx_esm.cu @@ -1,10 +1,10 @@ #include <cuda.h> #include <cuda_runtime_api.h> -#include "../includeCXX/sfx_esm.h" -#include "../includeCU/sfx_model_compute_subfunc.cuh" -#include "../includeCU/sfx_surface.cuh" -#include "../includeCU/sfx_memory_processing.cuh" +#include "sfx_esm.h" +#include "sfx_model_compute_subfunc.cuh" +#include "sfx_surface.cuh" +#include "sfx_memory_processing.cuh" namespace sfx_kernel { diff --git a/srcCU/sfx_memory_processing.cu b/srcCU/sfx_memory_processing.cu index 7dcc6cb..8d622c1 100644 --- a/srcCU/sfx_memory_processing.cu +++ b/srcCU/sfx_memory_processing.cu @@ -1,4 +1,4 @@ -#include "../includeCU/sfx_memory_processing.cuh" +#include "sfx_memory_processing.cuh" #include <cuda.h> #include <cuda_runtime_api.h> diff --git a/srcCU/sfx_sheba.cu b/srcCU/sfx_sheba.cu index c44a4bc..2161b18 100644 --- a/srcCU/sfx_sheba.cu +++ b/srcCU/sfx_sheba.cu @@ -1,10 +1,10 @@ #include <cuda.h> #include <cuda_runtime_api.h> -#include "../includeCXX/sfx_sheba.h" -#include "../includeCU/sfx_model_compute_subfunc.cuh" -#include "../includeCU/sfx_surface.cuh" -#include "../includeCU/sfx_memory_processing.cuh" +#include "sfx_sheba.h" +#include "sfx_model_compute_subfunc.cuh" +#include "sfx_surface.cuh" +#include "sfx_memory_processing.cuh" namespace sfx_kernel { diff --git a/srcCXX/model_base.cpp b/srcCXX/model_base.cpp index ca1bcdb..a72d47d 100644 --- a/srcCXX/model_base.cpp +++ b/srcCXX/model_base.cpp @@ -1,9 +1,9 @@ -#include "../includeCXX/model_base.h" +#include "model_base.h" #ifdef INCLUDE_CUDA - #include "../includeCU/sfx_memory_processing.cuh" + #include "sfx_memory_processing.cuh" #endif -#include "../includeCXX/sfx_memory_processing.h" +#include "sfx_memory_processing.h" template<typename T, MemType memIn, MemType memOut, MemType RunMem > ModelBase<T, memIn, memOut, RunMem>::ModelBase(sfxDataVecTypeC* sfx_in, diff --git a/srcCXX/sfx_call_class_func.cpp b/srcCXX/sfx_call_class_func.cpp index 1cc665d..9659c17 100644 --- a/srcCXX/sfx_call_class_func.cpp +++ b/srcCXX/sfx_call_class_func.cpp @@ -1,8 +1,8 @@ #include <stdlib.h> #include <stdio.h> -#include "../includeCXX/sfx_call_class_func.h" -#include "../includeCXX/sfx_esm.h" -#include "../includeCXX/sfx_sheba.h" +#include "sfx_call_class_func.h" +#include "sfx_esm.h" +#include "sfx_sheba.h" #include <vector> // -------------------------------------------------------------------------- // diff --git a/srcCXX/sfx_esm.cpp b/srcCXX/sfx_esm.cpp index 2d8979c..c324e80 100644 --- a/srcCXX/sfx_esm.cpp +++ b/srcCXX/sfx_esm.cpp @@ -1,14 +1,14 @@ #include <iostream> #include <cmath> -#include "../includeCXX/sfx_esm.h" +#include "sfx_esm.h" #ifdef INCLUDE_CUDA - #include "../includeCU/sfx_memory_processing.cuh" + #include "sfx_memory_processing.cuh" #endif -#include "../includeCXX/sfx_memory_processing.h" -#include "../includeCU/sfx_surface.cuh" -#include "../includeCU/sfx_model_compute_subfunc.cuh" +#include "sfx_memory_processing.h" +#include "sfx_surface.cuh" +#include "sfx_model_compute_subfunc.cuh" template<typename T, MemType memIn, MemType memOut, MemType RunMem > FluxEsmBase<T, memIn, memOut, RunMem>::FluxEsmBase(sfxDataVecTypeC* sfx_in, diff --git a/srcCXX/sfx_memory_processing.cpp b/srcCXX/sfx_memory_processing.cpp index 1d5805a..6b13745 100644 --- a/srcCXX/sfx_memory_processing.cpp +++ b/srcCXX/sfx_memory_processing.cpp @@ -1,4 +1,4 @@ -#include "../includeCXX/sfx_memory_processing.h" +#include "sfx_memory_processing.h" #include <cstdlib> #include <cstring> diff --git a/srcCXX/sfx_sheba.cpp b/srcCXX/sfx_sheba.cpp index 5063ebb..abd48c7 100644 --- a/srcCXX/sfx_sheba.cpp +++ b/srcCXX/sfx_sheba.cpp @@ -1,14 +1,14 @@ #include <iostream> #include <cmath> -#include "../includeCXX/sfx_sheba.h" +#include "sfx_sheba.h" #ifdef INCLUDE_CUDA - #include "../includeCU/sfx_memory_processing.cuh" + #include "sfx_memory_processing.cuh" #endif -#include "../includeCXX/sfx_memory_processing.h" -#include "../includeCU/sfx_surface.cuh" -#include "../includeCU/sfx_model_compute_subfunc.cuh" +#include "sfx_memory_processing.h" +#include "sfx_surface.cuh" +#include "sfx_model_compute_subfunc.cuh" template<typename T, MemType memIn, MemType memOut, MemType RunMem > FluxShebaBase<T, memIn, memOut, RunMem>::FluxShebaBase(sfxDataVecTypeC* sfx_in, -- GitLab