Skip to content

Commit

Permalink
Add support for AdaptiveCpp
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiashienzsch committed Jul 14, 2024
1 parent bdc35f8 commit daf3657
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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()
2 changes: 1 addition & 1 deletion doc/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 0 additions & 4 deletions src/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit daf3657

Please sign in to comment.