diff --git a/CMakeLists.txt b/CMakeLists.txt index 42a27b4..b2f6cdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,8 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_EXPORT_COMPILE_COMMANDS ON) -option(PFFDTD_ENABLE_SYCL "Build with sycl" OFF) +option(PFFDTD_ENABLE_ACPP_SYCL "Build with AdaptiveCpp SYCL" OFF) +option(PFFDTD_ENABLE_INTEL_SYCL "Build with Intel SYCL" OFF) include(FetchContent) FetchContent_Declare(mdspan GIT_REPOSITORY "https://github.com/kokkos/mdspan" GIT_TAG "stable" GIT_SHALLOW TRUE) @@ -21,13 +22,17 @@ find_package(HDF5 REQUIRED) find_package(OpenCV REQUIRED COMPONENTS core videoio) find_package(OpenMP REQUIRED) -if(PFFDTD_ENABLE_SYCL) +if(PFFDTD_ENABLE_ACPP_SYCL) + find_package(AdaptiveCpp REQUIRED) +endif() + +if(PFFDTD_ENABLE_INTEL_SYCL) find_package(IntelSYCL REQUIRED) endif() add_subdirectory(src/cpp) add_subdirectory(src/cpp/main_3d) -if(PFFDTD_ENABLE_SYCL) +if(PFFDTD_ENABLE_ACPP_SYCL OR PFFDTD_ENABLE_INTEL_SYCL) add_subdirectory(src/cpp/main_2d) endif() diff --git a/doc/build.md b/doc/build.md index 41dc7b2..7ff2fd9 100644 --- a/doc/build.md +++ b/doc/build.md @@ -4,7 +4,7 @@ ```sh # Build with sycl compiler & custom conan profile -cmake -S. -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -D PFFDTD_ENABLE_SYCL=ON -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake -DCONAN_HOST_PROFILE=/full/path/to/neo-fdtd/cmake/profile/linux_sycl +cmake -S. -B build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=icx -DCMAKE_CXX_COMPILER=icpx -D PFFDTD_ENABLE_INTEL_SYCL=ON -DCMAKE_PROJECT_TOP_LEVEL_INCLUDES=external/cmake-conan/conan_provider.cmake -DCONAN_HOST_PROFILE=/full/path/to/neo-fdtd/cmake/profile/linux_sycl cmake --build build # Using hyper-threads is usally a slow down. Use the number of physical cores. diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt index 7064144..1650b0a 100644 --- a/src/cpp/CMakeLists.txt +++ b/src/cpp/CMakeLists.txt @@ -31,7 +31,3 @@ target_sources(pffdtd pffdtd/video.cpp pffdtd/video.hpp ) - -# if(PFFDTD_ENABLE_SYCL) -# add_sycl_to_target(TARGET pffdtd SOURCES simulation_2d.cpp) -# endif()