Skip to content

Commit

Permalink
Merge Pull Request #12284 from brian-kelley/Trilinos/TpetraNodeTraits
Browse files Browse the repository at this point in the history
Automatically Merged using Trilinos Pull Request AutoTester
PR Title: b'Add some constexpr traits to Tpetra Node types'
PR Author: brian-kelley
  • Loading branch information
trilinos-autotester authored Oct 25, 2023
2 parents b4f2542 + a49171c commit 3ff154a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,18 @@ class KokkosDeviceWrapperNode {
/// release. This Node type is safe to use.
static constexpr bool classic = false;

//! Whether the ExecutionSpace is Kokkos::Serial.
#ifdef KOKKOS_ENABLE_SERIAL
static constexpr bool is_serial = std::is_same_v<ExecutionSpace, Kokkos::Serial>;
#else
static constexpr bool is_serial = false;
#endif

//! Whether the ExecutionSpace is CPU-like (its default memory space is HostSpace)
static constexpr bool is_cpu = std::is_same_v<typename ExecutionSpace::memory_space, Kokkos::HostSpace>;
//! Whether the ExecutionSpace is GPU-like (its default memory space is not HostSpace)
static constexpr bool is_gpu = !is_cpu;

KokkosDeviceWrapperNode (Teuchos::ParameterList& /* params */) = delete;
KokkosDeviceWrapperNode () = delete;

Expand Down

0 comments on commit 3ff154a

Please sign in to comment.