Skip to content
Snippets Groups Projects
Commit 27782d60 authored by Abhishek Yenpure's avatar Abhishek Yenpure
Browse files

Changes to initialization of Kokkos backend

-- Instead of initializing kokkos backend for every specific backend,
   move the initialization based on `VTK_USE_KOKKOS` flag using CMAKE compile
   definition
parent 78825dc3
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,9 @@ vtkm_add_target_information(${vtkm_accel_target}
DEVICE_SOURCES ${sources})
list(TRANSFORM nowrap_classes APPEND ".cxx" OUTPUT_VARIABLE device_sources)
if(VTK_USE_KOKKOS)
add_compile_definitions(VTK_USE_KOKKOS)
endif()
if (TARGET vtkm::cuda)
# Temporarily suppress "has address taken but no possible call to it" warnings,
# until we figure out its implications.
......@@ -53,14 +56,13 @@ if (TARGET vtkm::cuda)
vtk_module_set_properties(VTK::AcceleratorsVTKmCore CUDA_SEPARABLE_COMPILATION ON)
elseif (TARGET vtkm::kokkos_cuda)
add_compile_definitions(VTK_USE_KOKKOS)
set_source_files_properties(${device_sources} PROPERTIES LANGUAGE CUDA)
kokkos_compilation(SOURCE ${device_sources})
elseif (TARGET vtkm::kokkos_hip)
add_compile_definitions(VTK_USE_KOKKOS)
set_source_files_properties(${device_sources} PROPERTIES LANGUAGE HIP)
kokkos_compilation(SOURCE ${device_sources})
endif ()
if (MSVC)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment