From e81ca0526e8592df1657d3a9132c096e8a14e938 Mon Sep 17 00:00:00 2001 From: Tong Dong Qiu Date: Tue, 1 Feb 2022 16:51:32 +0100 Subject: [PATCH] Move opencl files to separate folder --- CMakeLists_files.cmake | 36 +++++++++---------- opencl-source-provider.cmake | 2 +- opm/simulators/linalg/bda/BdaBridge.cpp | 4 +-- .../linalg/bda/WellContributions.cpp | 2 +- .../linalg/bda/{ => opencl}/BILU0.cpp | 4 +-- .../linalg/bda/{ => opencl}/BILU0.hpp | 6 ++-- .../linalg/bda/{ => opencl}/BISAI.cpp | 4 +-- .../linalg/bda/{ => opencl}/BISAI.hpp | 8 ++--- .../linalg/bda/{ => opencl}/CPR.cpp | 4 +-- .../linalg/bda/{ => opencl}/CPR.hpp | 12 +++---- .../linalg/bda/{ => opencl}/ChowPatelIlu.cpp | 2 +- .../linalg/bda/{ => opencl}/ChowPatelIlu.hpp | 2 +- .../linalg/bda/{ => opencl}/OpenclMatrix.cpp | 2 +- .../linalg/bda/{ => opencl}/OpenclMatrix.hpp | 2 +- .../linalg/bda/opencl/Preconditioner.cpp | 6 ++-- .../linalg/bda/opencl/Preconditioner.hpp | 2 +- .../linalg/bda/{ => opencl}/opencl.cpp | 2 +- .../linalg/bda/{ => opencl}/opencl.hpp | 0 .../linalg/bda/{ => opencl}/openclKernels.cpp | 4 +-- .../linalg/bda/{ => opencl}/openclKernels.hpp | 2 +- .../bda/{ => opencl}/openclSolverBackend.cpp | 4 +-- .../bda/{ => opencl}/openclSolverBackend.hpp | 6 ++-- .../{ => opencl}/openclWellContributions.cpp | 2 +- .../{ => opencl}/openclWellContributions.hpp | 4 +-- tests/test_csrToCscOffsetMap.cpp | 2 +- tests/test_solvetransposed3x3.cpp | 2 +- 26 files changed, 63 insertions(+), 63 deletions(-) rename opm/simulators/linalg/bda/{ => opencl}/BILU0.cpp (98%) rename opm/simulators/linalg/bda/{ => opencl}/BILU0.hpp (95%) rename opm/simulators/linalg/bda/{ => opencl}/BISAI.cpp (99%) rename opm/simulators/linalg/bda/{ => opencl}/BISAI.hpp (95%) rename opm/simulators/linalg/bda/{ => opencl}/CPR.cpp (99%) rename opm/simulators/linalg/bda/{ => opencl}/CPR.hpp (94%) rename opm/simulators/linalg/bda/{ => opencl}/ChowPatelIlu.cpp (99%) rename opm/simulators/linalg/bda/{ => opencl}/ChowPatelIlu.hpp (98%) rename opm/simulators/linalg/bda/{ => opencl}/OpenclMatrix.cpp (97%) rename opm/simulators/linalg/bda/{ => opencl}/OpenclMatrix.hpp (97%) rename opm/simulators/linalg/bda/{ => opencl}/opencl.cpp (98%) rename opm/simulators/linalg/bda/{ => opencl}/opencl.hpp (100%) rename opm/simulators/linalg/bda/{ => opencl}/openclKernels.cpp (99%) rename opm/simulators/linalg/bda/{ => opencl}/openclKernels.hpp (99%) rename opm/simulators/linalg/bda/{ => opencl}/openclSolverBackend.cpp (99%) rename opm/simulators/linalg/bda/{ => opencl}/openclSolverBackend.hpp (98%) rename opm/simulators/linalg/bda/{ => opencl}/openclWellContributions.cpp (98%) rename opm/simulators/linalg/bda/{ => opencl}/openclWellContributions.hpp (95%) diff --git a/CMakeLists_files.cmake b/CMakeLists_files.cmake index 2cf45c5a4..45c093e8f 100644 --- a/CMakeLists_files.cmake +++ b/CMakeLists_files.cmake @@ -98,17 +98,17 @@ if(CUDA_FOUND) endif() if(OPENCL_FOUND) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BlockedMatrix.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BILU0.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/BILU0.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/Reorder.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/ChowPatelIlu.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BISAI.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/CPR.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/openclKernels.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/OpenclMatrix.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/ChowPatelIlu.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/BISAI.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/CPR.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/opencl.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/openclKernels.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/OpenclMatrix.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/Preconditioner.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/openclSolverBackend.cpp) - list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/openclWellContributions.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/openclSolverBackend.cpp) + list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/openclWellContributions.cpp) endif() if(CUDA_FOUND OR OPENCL_FOUND OR HAVE_FPGA OR HAVE_AMGCL) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/WellContributions.cpp) @@ -254,24 +254,24 @@ list (APPEND PUBLIC_HEADER_FILES opm/simulators/linalg/bda/BdaBridge.hpp opm/simulators/linalg/bda/BdaResult.hpp opm/simulators/linalg/bda/BdaSolver.hpp - opm/simulators/linalg/bda/BILU0.hpp + opm/simulators/linalg/bda/opencl/BILU0.hpp opm/simulators/linalg/bda/BlockedMatrix.hpp - opm/simulators/linalg/bda/CPR.hpp + opm/simulators/linalg/bda/opencl/CPR.hpp opm/simulators/linalg/bda/cuda_header.hpp opm/simulators/linalg/bda/cusparseSolverBackend.hpp - opm/simulators/linalg/bda/ChowPatelIlu.hpp - opm/simulators/linalg/bda/BISAI.hpp + opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp + opm/simulators/linalg/bda/opencl/BISAI.hpp opm/simulators/linalg/bda/FPGABILU0.hpp opm/simulators/linalg/bda/FPGASolverBackend.hpp opm/simulators/linalg/bda/FPGAUtils.hpp opm/simulators/linalg/bda/Reorder.hpp opm/simulators/linalg/bda/ILUReorder.hpp - opm/simulators/linalg/bda/opencl.hpp - opm/simulators/linalg/bda/openclKernels.hpp - opm/simulators/linalg/bda/OpenclMatrix.hpp + opm/simulators/linalg/bda/opencl/opencl.hpp + opm/simulators/linalg/bda/opencl/openclKernels.hpp + opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp opm/simulators/linalg/bda/opencl/Preconditioner.hpp - opm/simulators/linalg/bda/openclSolverBackend.hpp - opm/simulators/linalg/bda/openclWellContributions.hpp + opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp + opm/simulators/linalg/bda/opencl/openclWellContributions.hpp opm/simulators/linalg/bda/Matrix.hpp opm/simulators/linalg/bda/MultisegmentWellContribution.hpp opm/simulators/linalg/bda/WellContributions.hpp diff --git a/opencl-source-provider.cmake b/opencl-source-provider.cmake index 7002329b0..07567ead7 100644 --- a/opencl-source-provider.cmake +++ b/opencl-source-provider.cmake @@ -14,7 +14,7 @@ endif() set(CL_SRC_FILE ${PROJECT_BINARY_DIR}/clSources.cpp) file(WRITE ${CL_SRC_FILE} "// This file is auto-generated. Do not edit!\n\n") file(APPEND ${CL_SRC_FILE} "#include \n\n") -file(APPEND ${CL_SRC_FILE} "#include <${BDA_DIR}/openclKernels.hpp>\n\n") +file(APPEND ${CL_SRC_FILE} "#include <${BDA_DIR}/opencl/openclKernels.hpp>\n\n") file(APPEND ${CL_SRC_FILE} "namespace Opm\{\n\n") file(APPEND ${CL_SRC_FILE} "namespace Accelerator\{\n\n") diff --git a/opm/simulators/linalg/bda/BdaBridge.cpp b/opm/simulators/linalg/bda/BdaBridge.cpp index 9de8594c7..b101cace6 100644 --- a/opm/simulators/linalg/bda/BdaBridge.cpp +++ b/opm/simulators/linalg/bda/BdaBridge.cpp @@ -34,8 +34,8 @@ #endif #if HAVE_OPENCL -#include -#include +#include +#include #endif #if HAVE_FPGA diff --git a/opm/simulators/linalg/bda/WellContributions.cpp b/opm/simulators/linalg/bda/WellContributions.cpp index 655e9974b..2edaf0768 100644 --- a/opm/simulators/linalg/bda/WellContributions.cpp +++ b/opm/simulators/linalg/bda/WellContributions.cpp @@ -26,7 +26,7 @@ #include #ifdef HAVE_OPENCL -#include +#include #endif #ifdef HAVE_CUDA diff --git a/opm/simulators/linalg/bda/BILU0.cpp b/opm/simulators/linalg/bda/opencl/BILU0.cpp similarity index 98% rename from opm/simulators/linalg/bda/BILU0.cpp rename to opm/simulators/linalg/bda/opencl/BILU0.cpp index 877b6d676..a6b7a1a43 100644 --- a/opm/simulators/linalg/bda/BILU0.cpp +++ b/opm/simulators/linalg/bda/opencl/BILU0.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/opm/simulators/linalg/bda/BILU0.hpp b/opm/simulators/linalg/bda/opencl/BILU0.hpp similarity index 95% rename from opm/simulators/linalg/bda/BILU0.hpp rename to opm/simulators/linalg/bda/opencl/BILU0.hpp index 48f26db9c..4578b9291 100644 --- a/opm/simulators/linalg/bda/BILU0.hpp +++ b/opm/simulators/linalg/bda/opencl/BILU0.hpp @@ -25,10 +25,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include namespace Opm diff --git a/opm/simulators/linalg/bda/BISAI.cpp b/opm/simulators/linalg/bda/opencl/BISAI.cpp similarity index 99% rename from opm/simulators/linalg/bda/BISAI.cpp rename to opm/simulators/linalg/bda/opencl/BISAI.cpp index 4a77abfa7..fb18f128f 100644 --- a/opm/simulators/linalg/bda/BISAI.cpp +++ b/opm/simulators/linalg/bda/opencl/BISAI.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include namespace Opm diff --git a/opm/simulators/linalg/bda/BISAI.hpp b/opm/simulators/linalg/bda/opencl/BISAI.hpp similarity index 95% rename from opm/simulators/linalg/bda/BISAI.hpp rename to opm/simulators/linalg/bda/opencl/BISAI.hpp index e3d95e8c3..d8c76edfd 100644 --- a/opm/simulators/linalg/bda/BISAI.hpp +++ b/opm/simulators/linalg/bda/opencl/BISAI.hpp @@ -22,10 +22,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include namespace Opm diff --git a/opm/simulators/linalg/bda/CPR.cpp b/opm/simulators/linalg/bda/opencl/CPR.cpp similarity index 99% rename from opm/simulators/linalg/bda/CPR.cpp rename to opm/simulators/linalg/bda/opencl/CPR.cpp index e2942cac5..779d2e0e7 100644 --- a/opm/simulators/linalg/bda/CPR.cpp +++ b/opm/simulators/linalg/bda/opencl/CPR.cpp @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include namespace Opm diff --git a/opm/simulators/linalg/bda/CPR.hpp b/opm/simulators/linalg/bda/opencl/CPR.hpp similarity index 94% rename from opm/simulators/linalg/bda/CPR.hpp rename to opm/simulators/linalg/bda/opencl/CPR.hpp index d705f626c..8cfef2e23 100644 --- a/opm/simulators/linalg/bda/CPR.hpp +++ b/opm/simulators/linalg/bda/opencl/CPR.hpp @@ -30,16 +30,16 @@ #endif #include -#include -#include +#include +#include #include -#include +#include #include #include -#include -#include -#include +#include +#include +#include namespace Opm { diff --git a/opm/simulators/linalg/bda/ChowPatelIlu.cpp b/opm/simulators/linalg/bda/opencl/ChowPatelIlu.cpp similarity index 99% rename from opm/simulators/linalg/bda/ChowPatelIlu.cpp rename to opm/simulators/linalg/bda/opencl/ChowPatelIlu.cpp index ecfa919ee..d12cc41d1 100644 --- a/opm/simulators/linalg/bda/ChowPatelIlu.cpp +++ b/opm/simulators/linalg/bda/opencl/ChowPatelIlu.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #if CHOW_PATEL diff --git a/opm/simulators/linalg/bda/ChowPatelIlu.hpp b/opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp similarity index 98% rename from opm/simulators/linalg/bda/ChowPatelIlu.hpp rename to opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp index 654597aff..52e01cb78 100644 --- a/opm/simulators/linalg/bda/ChowPatelIlu.hpp +++ b/opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp @@ -23,7 +23,7 @@ #include -#include +#include #include // Variables CHOW_PATEL, CHOW_PATEL_GPU and CHOW_PATEL_GPU_PARALLEL are set by CMake diff --git a/opm/simulators/linalg/bda/OpenclMatrix.cpp b/opm/simulators/linalg/bda/opencl/OpenclMatrix.cpp similarity index 97% rename from opm/simulators/linalg/bda/OpenclMatrix.cpp rename to opm/simulators/linalg/bda/opencl/OpenclMatrix.cpp index 1911771e9..09ac585df 100644 --- a/opm/simulators/linalg/bda/OpenclMatrix.cpp +++ b/opm/simulators/linalg/bda/opencl/OpenclMatrix.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/opm/simulators/linalg/bda/OpenclMatrix.hpp b/opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp similarity index 97% rename from opm/simulators/linalg/bda/OpenclMatrix.hpp rename to opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp index 70a09270b..2ea31f3b0 100644 --- a/opm/simulators/linalg/bda/OpenclMatrix.hpp +++ b/opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp @@ -22,7 +22,7 @@ #include -#include +#include namespace Opm { diff --git a/opm/simulators/linalg/bda/opencl/Preconditioner.cpp b/opm/simulators/linalg/bda/opencl/Preconditioner.cpp index 95eee9be8..f7256039b 100644 --- a/opm/simulators/linalg/bda/opencl/Preconditioner.cpp +++ b/opm/simulators/linalg/bda/opencl/Preconditioner.cpp @@ -22,9 +22,9 @@ #include -#include -#include -#include +#include +#include +#include #include namespace Opm diff --git a/opm/simulators/linalg/bda/opencl/Preconditioner.hpp b/opm/simulators/linalg/bda/opencl/Preconditioner.hpp index 53f45b4c2..a288f952d 100644 --- a/opm/simulators/linalg/bda/opencl/Preconditioner.hpp +++ b/opm/simulators/linalg/bda/opencl/Preconditioner.hpp @@ -20,7 +20,7 @@ #ifndef OPM_PRECONDITIONER_HEADER_INCLUDED #define OPM_PRECONDITIONER_HEADER_INCLUDED -#include +#include #include namespace Opm diff --git a/opm/simulators/linalg/bda/opencl.cpp b/opm/simulators/linalg/bda/opencl/opencl.cpp similarity index 98% rename from opm/simulators/linalg/bda/opencl.cpp rename to opm/simulators/linalg/bda/opencl/opencl.cpp index f7995ce51..a35839f78 100644 --- a/opm/simulators/linalg/bda/opencl.cpp +++ b/opm/simulators/linalg/bda/opencl/opencl.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include namespace Opm diff --git a/opm/simulators/linalg/bda/opencl.hpp b/opm/simulators/linalg/bda/opencl/opencl.hpp similarity index 100% rename from opm/simulators/linalg/bda/opencl.hpp rename to opm/simulators/linalg/bda/opencl/opencl.hpp diff --git a/opm/simulators/linalg/bda/openclKernels.cpp b/opm/simulators/linalg/bda/opencl/openclKernels.cpp similarity index 99% rename from opm/simulators/linalg/bda/openclKernels.cpp rename to opm/simulators/linalg/bda/opencl/openclKernels.cpp index fa1ae2a9a..67cf97827 100644 --- a/opm/simulators/linalg/bda/openclKernels.cpp +++ b/opm/simulators/linalg/bda/opencl/openclKernels.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include // defines CHOW_PATEL +#include +#include // defines CHOW_PATEL namespace Opm { diff --git a/opm/simulators/linalg/bda/openclKernels.hpp b/opm/simulators/linalg/bda/opencl/openclKernels.hpp similarity index 99% rename from opm/simulators/linalg/bda/openclKernels.hpp rename to opm/simulators/linalg/bda/opencl/openclKernels.hpp index 7f98e9a1d..c56b748fb 100644 --- a/opm/simulators/linalg/bda/openclKernels.hpp +++ b/opm/simulators/linalg/bda/opencl/openclKernels.hpp @@ -23,7 +23,7 @@ #include #include -#include +#include namespace Opm { diff --git a/opm/simulators/linalg/bda/openclSolverBackend.cpp b/opm/simulators/linalg/bda/opencl/openclSolverBackend.cpp similarity index 99% rename from opm/simulators/linalg/bda/openclSolverBackend.cpp rename to opm/simulators/linalg/bda/opencl/openclSolverBackend.cpp index c91da75ad..5a01653c7 100644 --- a/opm/simulators/linalg/bda/openclSolverBackend.cpp +++ b/opm/simulators/linalg/bda/opencl/openclSolverBackend.cpp @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/opm/simulators/linalg/bda/openclSolverBackend.hpp b/opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp similarity index 98% rename from opm/simulators/linalg/bda/openclSolverBackend.hpp rename to opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp index 141a89d86..a3f6e2c81 100644 --- a/opm/simulators/linalg/bda/openclSolverBackend.hpp +++ b/opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp @@ -20,13 +20,13 @@ #ifndef OPM_OPENCLSOLVER_BACKEND_HEADER_INCLUDED #define OPM_OPENCLSOLVER_BACKEND_HEADER_INCLUDED -#include -#include +#include +#include #include #include #include #include -#include +#include #include diff --git a/opm/simulators/linalg/bda/openclWellContributions.cpp b/opm/simulators/linalg/bda/opencl/openclWellContributions.cpp similarity index 98% rename from opm/simulators/linalg/bda/openclWellContributions.cpp rename to opm/simulators/linalg/bda/opencl/openclWellContributions.cpp index b8c484fd9..c6314c54a 100644 --- a/opm/simulators/linalg/bda/openclWellContributions.cpp +++ b/opm/simulators/linalg/bda/opencl/openclWellContributions.cpp @@ -19,7 +19,7 @@ #include // CMake -#include +#include #include #include diff --git a/opm/simulators/linalg/bda/openclWellContributions.hpp b/opm/simulators/linalg/bda/opencl/openclWellContributions.hpp similarity index 95% rename from opm/simulators/linalg/bda/openclWellContributions.hpp rename to opm/simulators/linalg/bda/opencl/openclWellContributions.hpp index 2f727a684..c2be1a843 100644 --- a/opm/simulators/linalg/bda/openclWellContributions.hpp +++ b/opm/simulators/linalg/bda/opencl/openclWellContributions.hpp @@ -22,8 +22,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/tests/test_csrToCscOffsetMap.cpp b/tests/test_csrToCscOffsetMap.cpp index d5d3b5499..f570301d1 100644 --- a/tests/test_csrToCscOffsetMap.cpp +++ b/tests/test_csrToCscOffsetMap.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include BOOST_AUTO_TEST_CASE(testcsrtocscoffsetmap){ diff --git a/tests/test_solvetransposed3x3.cpp b/tests/test_solvetransposed3x3.cpp index 657883b88..8d3ee2d1d 100644 --- a/tests/test_solvetransposed3x3.cpp +++ b/tests/test_solvetransposed3x3.cpp @@ -31,7 +31,7 @@ #include -#include +#include BOOST_AUTO_TEST_CASE(testsolvetransposed3x3) {