40 #ifndef TPETRA_DETAILS_CHECKPOINTER_HPP 41 #define TPETRA_DETAILS_CHECKPOINTER_HPP 50 #include "TpetraCore_config.h" 53 #ifdef HAVE_TPETRACORE_CUDA 54 #ifndef DOXYGEN_SHOULD_SKIP_THIS 58 #endif // DOXYGEN_SHOULD_SKIP_THIS 59 #endif // HAVE_TPETRACORE_CUDA 65 bool isHostAccessible (
const void* ptr);
67 template<
class ExecutionSpace>
68 struct CheckPointerAccessibility {
70 accessible (
const void* ptr,
71 const ExecutionSpace& )
73 return isHostAccessible (ptr);
77 #ifdef HAVE_TPETRACORE_CUDA 79 struct CheckPointerAccessibility<Kokkos::Cuda> {
81 accessible (
const void* ptr,
82 const Kokkos::Cuda& space);
84 #endif // HAVE_TPETRACORE_CUDA 97 template<
class ExecutionSpace>
100 const ExecutionSpace& space)
102 using impl_type = Impl::CheckPointerAccessibility<ExecutionSpace>;
103 return impl_type::accessible (ptr, space);
116 #endif // TPETRA_DETAILS_CHECKPOINTER_HPP Namespace Tpetra contains the class and methods constituting the Tpetra library.
std::string memorySpaceName(const void *ptr)
Return the Kokkos memory space name (without "Kokkos::") corresponding to the given nonnull pointer...
bool pointerAccessibleFromExecutionSpace(const void *ptr, const ExecutionSpace &space)
Is the given nonnull ptr accessible from the given execution space?
Implementation details of Tpetra.