Skip to content

Commit

Permalink
Don't fail to define broader 'lambdas are available' macro
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilMiller committed May 3, 2023
1 parent 4470284 commit 51d7c72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
7 changes: 2 additions & 5 deletions core/src/Kokkos_Macros.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,8 @@ static constexpr bool kokkos_omp_on_host() { return false; }

#if defined(KOKKOS_ENABLE_CUDA) && defined(KOKKOS_ENABLE_DEPRECATED_CODE_4)
#define KOKKOS_ENABLE_CUDA_LDG_INTRINSIC
// This was previously defined from the configuration option which was removed
#define KOKKOS_ENABLE_CUDA_LAMBDA
#endif

#define KOKKOS_INVALID_INDEX (~std::size_t(0))
Expand Down Expand Up @@ -607,9 +609,4 @@ static constexpr bool kokkos_omp_on_host() { return false; }
#define KOKKOS_IMPL_ENFORCE_EMPTY_BASE_OPTIMIZATION
#endif

// This was previously defined from the configuration option which was removed
#if defined(KOKKOS_ENABLE_CUDA)
#define KOKKOS_ENABLE_CUDA_LAMBDA
#endif

#endif // #ifndef KOKKOS_MACROS_HPP
6 changes: 0 additions & 6 deletions core/src/setup/Kokkos_Setup_Cuda.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,9 @@
#error "Cuda device capability >= 3.0 is required."
#endif

#ifdef KOKKOS_ENABLE_CUDA_LAMBDA
#define KOKKOS_LAMBDA [=] __host__ __device__

#define KOKKOS_CLASS_LAMBDA [ =, *this ] __host__ __device__

#else // !defined(KOKKOS_ENABLE_CUDA_LAMBDA)
#undef KOKKOS_ENABLE_CXX11_DISPATCH_LAMBDA
#endif // !defined(KOKKOS_ENABLE_CUDA_LAMBDA)

#define KOKKOS_IMPL_FORCEINLINE_FUNCTION __device__ __host__ __forceinline__
#define KOKKOS_IMPL_FORCEINLINE __forceinline__
#define KOKKOS_IMPL_INLINE_FUNCTION __device__ __host__ inline
Expand Down

0 comments on commit 51d7c72

Please sign in to comment.