Move opencl files to separate folder

This commit is contained in:
Tong Dong Qiu 2022-02-01 16:51:32 +01:00
parent a514947b5a
commit e81ca0526e
26 changed files with 63 additions and 63 deletions

View File

@ -98,17 +98,17 @@ if(CUDA_FOUND)
endif() endif()
if(OPENCL_FOUND) if(OPENCL_FOUND)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BlockedMatrix.cpp) 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/Reorder.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/ChowPatelIlu.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/ChowPatelIlu.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/BISAI.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/BISAI.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/CPR.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/CPR.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/opencl.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/openclKernels.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/openclKernels.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/OpenclMatrix.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/opencl/Preconditioner.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/openclSolverBackend.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/openclSolverBackend.cpp)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/openclWellContributions.cpp) list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/opencl/openclWellContributions.cpp)
endif() endif()
if(CUDA_FOUND OR OPENCL_FOUND OR HAVE_FPGA OR HAVE_AMGCL) if(CUDA_FOUND OR OPENCL_FOUND OR HAVE_FPGA OR HAVE_AMGCL)
list (APPEND MAIN_SOURCE_FILES opm/simulators/linalg/bda/WellContributions.cpp) 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/BdaBridge.hpp
opm/simulators/linalg/bda/BdaResult.hpp opm/simulators/linalg/bda/BdaResult.hpp
opm/simulators/linalg/bda/BdaSolver.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/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/cuda_header.hpp
opm/simulators/linalg/bda/cusparseSolverBackend.hpp opm/simulators/linalg/bda/cusparseSolverBackend.hpp
opm/simulators/linalg/bda/ChowPatelIlu.hpp opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp
opm/simulators/linalg/bda/BISAI.hpp opm/simulators/linalg/bda/opencl/BISAI.hpp
opm/simulators/linalg/bda/FPGABILU0.hpp opm/simulators/linalg/bda/FPGABILU0.hpp
opm/simulators/linalg/bda/FPGASolverBackend.hpp opm/simulators/linalg/bda/FPGASolverBackend.hpp
opm/simulators/linalg/bda/FPGAUtils.hpp opm/simulators/linalg/bda/FPGAUtils.hpp
opm/simulators/linalg/bda/Reorder.hpp opm/simulators/linalg/bda/Reorder.hpp
opm/simulators/linalg/bda/ILUReorder.hpp opm/simulators/linalg/bda/ILUReorder.hpp
opm/simulators/linalg/bda/opencl.hpp opm/simulators/linalg/bda/opencl/opencl.hpp
opm/simulators/linalg/bda/openclKernels.hpp opm/simulators/linalg/bda/opencl/openclKernels.hpp
opm/simulators/linalg/bda/OpenclMatrix.hpp opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp
opm/simulators/linalg/bda/opencl/Preconditioner.hpp opm/simulators/linalg/bda/opencl/Preconditioner.hpp
opm/simulators/linalg/bda/openclSolverBackend.hpp opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp
opm/simulators/linalg/bda/openclWellContributions.hpp opm/simulators/linalg/bda/opencl/openclWellContributions.hpp
opm/simulators/linalg/bda/Matrix.hpp opm/simulators/linalg/bda/Matrix.hpp
opm/simulators/linalg/bda/MultisegmentWellContribution.hpp opm/simulators/linalg/bda/MultisegmentWellContribution.hpp
opm/simulators/linalg/bda/WellContributions.hpp opm/simulators/linalg/bda/WellContributions.hpp

View File

@ -14,7 +14,7 @@ endif()
set(CL_SRC_FILE ${PROJECT_BINARY_DIR}/clSources.cpp) 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(WRITE ${CL_SRC_FILE} "// This file is auto-generated. Do not edit!\n\n")
file(APPEND ${CL_SRC_FILE} "#include <config.h>\n\n") file(APPEND ${CL_SRC_FILE} "#include <config.h>\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 Opm\{\n\n")
file(APPEND ${CL_SRC_FILE} "namespace Accelerator\{\n\n") file(APPEND ${CL_SRC_FILE} "namespace Accelerator\{\n\n")

View File

@ -34,8 +34,8 @@
#endif #endif
#if HAVE_OPENCL #if HAVE_OPENCL
#include <opm/simulators/linalg/bda/openclSolverBackend.hpp> #include <opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp>
#include <opm/simulators/linalg/bda/openclWellContributions.hpp> #include <opm/simulators/linalg/bda/opencl/openclWellContributions.hpp>
#endif #endif
#if HAVE_FPGA #if HAVE_FPGA

View File

@ -26,7 +26,7 @@
#include <opm/simulators/linalg/bda/WellContributions.hpp> #include <opm/simulators/linalg/bda/WellContributions.hpp>
#ifdef HAVE_OPENCL #ifdef HAVE_OPENCL
#include <opm/simulators/linalg/bda/openclWellContributions.hpp> #include <opm/simulators/linalg/bda/opencl/openclWellContributions.hpp>
#endif #endif
#ifdef HAVE_CUDA #ifdef HAVE_CUDA

View File

@ -25,8 +25,8 @@
#include <dune/common/timer.hh> #include <dune/common/timer.hh>
#include <opm/simulators/linalg/bda/BdaSolver.hpp> #include <opm/simulators/linalg/bda/BdaSolver.hpp>
#include <opm/simulators/linalg/bda/BILU0.hpp> #include <opm/simulators/linalg/bda/opencl/BILU0.hpp>
#include <opm/simulators/linalg/bda/ChowPatelIlu.hpp> #include <opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp>
#include <opm/simulators/linalg/bda/Reorder.hpp> #include <opm/simulators/linalg/bda/Reorder.hpp>

View File

@ -25,10 +25,10 @@
#include <opm/simulators/linalg/bda/BlockedMatrix.hpp> #include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
#include <opm/simulators/linalg/bda/ILUReorder.hpp> #include <opm/simulators/linalg/bda/ILUReorder.hpp>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <opm/simulators/linalg/bda/openclKernels.hpp> #include <opm/simulators/linalg/bda/opencl/openclKernels.hpp>
#include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp> #include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp>
#include <opm/simulators/linalg/bda/ChowPatelIlu.hpp> #include <opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp>
namespace Opm namespace Opm

View File

@ -26,8 +26,8 @@
#include <dune/common/timer.hh> #include <dune/common/timer.hh>
#include <opm/simulators/linalg/bda/BdaSolver.hpp> #include <opm/simulators/linalg/bda/BdaSolver.hpp>
#include <opm/simulators/linalg/bda/BILU0.hpp> #include <opm/simulators/linalg/bda/opencl/BILU0.hpp>
#include <opm/simulators/linalg/bda/BISAI.hpp> #include <opm/simulators/linalg/bda/opencl/BISAI.hpp>
#include <opm/simulators/linalg/bda/Reorder.hpp> #include <opm/simulators/linalg/bda/Reorder.hpp>
namespace Opm namespace Opm

View File

@ -22,10 +22,10 @@
#include <mutex> #include <mutex>
#include <opm/simulators/linalg/bda/BILU0.hpp> #include <opm/simulators/linalg/bda/opencl/BILU0.hpp>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <opm/simulators/linalg/bda/openclKernels.hpp> #include <opm/simulators/linalg/bda/opencl/openclKernels.hpp>
#include <opm/simulators/linalg/bda/openclSolverBackend.hpp> #include <opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp>
#include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp> #include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp>
namespace Opm namespace Opm

View File

@ -30,8 +30,8 @@
#include <opm/simulators/linalg/bda/BdaBridge.hpp> #include <opm/simulators/linalg/bda/BdaBridge.hpp>
#include <opm/simulators/linalg/bda/BlockedMatrix.hpp> #include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
#include <opm/simulators/linalg/bda/CPR.hpp> #include <opm/simulators/linalg/bda/opencl/CPR.hpp>
#include <opm/simulators/linalg/bda/OpenclMatrix.hpp> #include <opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp>
namespace Opm namespace Opm

View File

@ -30,16 +30,16 @@
#endif #endif
#include <dune/istl/umfpack.hh> #include <dune/istl/umfpack.hh>
#include <opm/simulators/linalg/bda/BILU0.hpp> #include <opm/simulators/linalg/bda/opencl/BILU0.hpp>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <opm/simulators/linalg/bda/Matrix.hpp> #include <opm/simulators/linalg/bda/Matrix.hpp>
#include <opm/simulators/linalg/bda/OpenclMatrix.hpp> #include <opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp>
#include <opm/simulators/linalg/bda/ILUReorder.hpp> #include <opm/simulators/linalg/bda/ILUReorder.hpp>
#include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp> #include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp>
#include <opm/simulators/linalg/bda/openclKernels.hpp> #include <opm/simulators/linalg/bda/opencl/openclKernels.hpp>
#include <opm/simulators/linalg/bda/ChowPatelIlu.hpp> #include <opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp>
#include <opm/simulators/linalg/bda/openclSolverBackend.hpp> #include <opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp>
namespace Opm namespace Opm
{ {

View File

@ -24,7 +24,7 @@
#include <dune/common/timer.hh> #include <dune/common/timer.hh>
#include <opm/simulators/linalg/MatrixBlock.hpp> #include <opm/simulators/linalg/MatrixBlock.hpp>
#include <opm/simulators/linalg/bda/ChowPatelIlu.hpp> #include <opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp>
#if CHOW_PATEL #if CHOW_PATEL

View File

@ -23,7 +23,7 @@
#include <mutex> #include <mutex>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <opm/simulators/linalg/bda/BlockedMatrix.hpp> #include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
// Variables CHOW_PATEL, CHOW_PATEL_GPU and CHOW_PATEL_GPU_PARALLEL are set by CMake // Variables CHOW_PATEL, CHOW_PATEL_GPU and CHOW_PATEL_GPU_PARALLEL are set by CMake

View File

@ -22,7 +22,7 @@
#include <opm/common/OpmLog/OpmLog.hpp> #include <opm/common/OpmLog/OpmLog.hpp>
#include <opm/common/ErrorMacros.hpp> #include <opm/common/ErrorMacros.hpp>
#include <opm/simulators/linalg/bda/OpenclMatrix.hpp> #include <opm/simulators/linalg/bda/opencl/OpenclMatrix.hpp>
#include <opm/simulators/linalg/bda/BlockedMatrix.hpp> #include <opm/simulators/linalg/bda/BlockedMatrix.hpp>
#include <opm/simulators/linalg/bda/Matrix.hpp> #include <opm/simulators/linalg/bda/Matrix.hpp>

View File

@ -22,7 +22,7 @@
#include <vector> #include <vector>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
namespace Opm namespace Opm
{ {

View File

@ -22,9 +22,9 @@
#include <opm/common/ErrorMacros.hpp> #include <opm/common/ErrorMacros.hpp>
#include <opm/simulators/linalg/bda/BILU0.hpp> #include <opm/simulators/linalg/bda/opencl/BILU0.hpp>
#include <opm/simulators/linalg/bda/BISAI.hpp> #include <opm/simulators/linalg/bda/opencl/BISAI.hpp>
#include <opm/simulators/linalg/bda/CPR.hpp> #include <opm/simulators/linalg/bda/opencl/CPR.hpp>
#include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp> #include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp>
namespace Opm namespace Opm

View File

@ -20,7 +20,7 @@
#ifndef OPM_PRECONDITIONER_HEADER_INCLUDED #ifndef OPM_PRECONDITIONER_HEADER_INCLUDED
#define OPM_PRECONDITIONER_HEADER_INCLUDED #define OPM_PRECONDITIONER_HEADER_INCLUDED
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <opm/simulators/linalg/bda/ILUReorder.hpp> #include <opm/simulators/linalg/bda/ILUReorder.hpp>
namespace Opm namespace Opm

View File

@ -18,7 +18,7 @@
*/ */
#include <config.h> #include <config.h>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <string> #include <string>
namespace Opm namespace Opm

View File

@ -25,8 +25,8 @@
#include <opm/common/ErrorMacros.hpp> #include <opm/common/ErrorMacros.hpp>
#include <dune/common/timer.hh> #include <dune/common/timer.hh>
#include <opm/simulators/linalg/bda/openclKernels.hpp> #include <opm/simulators/linalg/bda/opencl/openclKernels.hpp>
#include <opm/simulators/linalg/bda/ChowPatelIlu.hpp> // defines CHOW_PATEL #include <opm/simulators/linalg/bda/opencl/ChowPatelIlu.hpp> // defines CHOW_PATEL
namespace Opm namespace Opm
{ {

View File

@ -23,7 +23,7 @@
#include <string> #include <string>
#include <memory> #include <memory>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
namespace Opm namespace Opm
{ {

View File

@ -25,8 +25,8 @@
#include <opm/common/ErrorMacros.hpp> #include <opm/common/ErrorMacros.hpp>
#include <dune/common/timer.hh> #include <dune/common/timer.hh>
#include <opm/simulators/linalg/bda/openclSolverBackend.hpp> #include <opm/simulators/linalg/bda/opencl/openclSolverBackend.hpp>
#include <opm/simulators/linalg/bda/openclWellContributions.hpp> #include <opm/simulators/linalg/bda/opencl/openclWellContributions.hpp>
#include <opm/simulators/linalg/bda/BdaResult.hpp> #include <opm/simulators/linalg/bda/BdaResult.hpp>
#include <opm/simulators/linalg/bda/Reorder.hpp> #include <opm/simulators/linalg/bda/Reorder.hpp>

View File

@ -20,13 +20,13 @@
#ifndef OPM_OPENCLSOLVER_BACKEND_HEADER_INCLUDED #ifndef OPM_OPENCLSOLVER_BACKEND_HEADER_INCLUDED
#define OPM_OPENCLSOLVER_BACKEND_HEADER_INCLUDED #define OPM_OPENCLSOLVER_BACKEND_HEADER_INCLUDED
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <opm/simulators/linalg/bda/openclKernels.hpp> #include <opm/simulators/linalg/bda/opencl/openclKernels.hpp>
#include <opm/simulators/linalg/bda/BdaResult.hpp> #include <opm/simulators/linalg/bda/BdaResult.hpp>
#include <opm/simulators/linalg/bda/BdaSolver.hpp> #include <opm/simulators/linalg/bda/BdaSolver.hpp>
#include <opm/simulators/linalg/bda/ILUReorder.hpp> #include <opm/simulators/linalg/bda/ILUReorder.hpp>
#include <opm/simulators/linalg/bda/WellContributions.hpp> #include <opm/simulators/linalg/bda/WellContributions.hpp>
#include <opm/simulators/linalg/bda/BILU0.hpp> #include <opm/simulators/linalg/bda/opencl/BILU0.hpp>
#include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp> #include <opm/simulators/linalg/bda/opencl/Preconditioner.hpp>

View File

@ -19,7 +19,7 @@
#include <config.h> // CMake #include <config.h> // CMake
#include <opm/simulators/linalg/bda/openclWellContributions.hpp> #include <opm/simulators/linalg/bda/opencl/openclWellContributions.hpp>
#include <cstdlib> #include <cstdlib>
#include <cstring> #include <cstring>

View File

@ -22,8 +22,8 @@
#include <opm/simulators/linalg/bda/WellContributions.hpp> #include <opm/simulators/linalg/bda/WellContributions.hpp>
#include <opm/simulators/linalg/bda/opencl.hpp> #include <opm/simulators/linalg/bda/opencl/opencl.hpp>
#include <opm/simulators/linalg/bda/openclKernels.hpp> #include <opm/simulators/linalg/bda/opencl/openclKernels.hpp>
#include <memory> #include <memory>
#include <vector> #include <vector>

View File

@ -10,7 +10,7 @@
#include <dune/istl/bcrsmatrix.hh> #include <dune/istl/bcrsmatrix.hh>
#include <dune/istl/matrixmarket.hh> #include <dune/istl/matrixmarket.hh>
#include <opm/simulators/linalg/bda/BISAI.hpp> #include <opm/simulators/linalg/bda/opencl/BISAI.hpp>
BOOST_AUTO_TEST_CASE(testcsrtocscoffsetmap){ BOOST_AUTO_TEST_CASE(testcsrtocscoffsetmap){

View File

@ -31,7 +31,7 @@
#include <dune/istl/bcrsmatrix.hh> #include <dune/istl/bcrsmatrix.hh>
#include <opm/simulators/linalg/bda/CPR.hpp> #include <opm/simulators/linalg/bda/opencl/CPR.hpp>
BOOST_AUTO_TEST_CASE(testsolvetransposed3x3) BOOST_AUTO_TEST_CASE(testsolvetransposed3x3)
{ {