Skip to content

Commit

Permalink
Merge pull request #940 from lucbv/host_only_macro
Browse files Browse the repository at this point in the history
host only macro: adding macro to checks for any device backend
  • Loading branch information
lucbv authored Apr 23, 2021
2 parents 93b24bd + 5d735c0 commit 90970cc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 7 additions & 0 deletions cmake/KokkosKernels_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,13 @@
#endif
#endif

#if !defined(KOKKOS_ENABLE_CUDA) \
&& !defined(KOKKOS_ENABLE_HIP) \
&& !defined(KOKKOS_ENABLE_SYCL) \
&& !defined(KOKKOS_ENABLE_OPENMPTARGET)
#define KOKKOSKERNELS_ENABLE_HOST_ONLY
#endif


/*
* "Optimization level" for computational kernels in this subpackage.
Expand Down
2 changes: 0 additions & 2 deletions unit_test/cuda/Test_Cuda_Batched.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#ifndef TEST_CUDA_BATCHED_CPP
#define TEST_CUDA_BATCHED_CPP
#define KOKKOSKERNELS_CUDA_BATCHED_TESTS

#include<Test_Cuda.hpp>
#include<Test_Batched.hpp>

#undef KOKKOSKERNELS_CUDA_BATCHED_TESTS
#endif // TEST_CUDA_BATCHED_CPP

0 comments on commit 90970cc

Please sign in to comment.