1#ifndef KOKKOS_EXECUTION_TESTS_UTILS_KOKKOS_HPP
2#define KOKKOS_EXECUTION_TESTS_UTILS_KOKKOS_HPP
8#include "Kokkos_Core.hpp"
12template <Kokkos::ExecutionSpace Exec, Kokkos::ExecutionSpace OtherExec>
14 if constexpr (std::same_as<Exec, OtherExec>) {
15 return exec == other_exec;
21template <Kokkos::ExecutionSpace Exec>
23#if defined(KOKKOS_ENABLE_CUDA)
24 return std::same_as<Exec, Kokkos::Cuda>;
25#elif defined(KOKKOS_ENABLE_HIP)
26 return std::same_as<Exec, Kokkos::HIP>;
32template <Kokkos::ExecutionSpace Exec>
33void show_exec_space_id(
const Exec& exec, std::string_view label =
"", std::ostream& out = std::cout) {
34 out <<
"Execution space instance " << label <<
" has device ID " << Kokkos::Tools::Experimental::device_id(exec)
void show_exec_space_id(const Exec &exec, std::string_view label="", std::ostream &out=std::cout)
constexpr bool on_device()
bool are_same_instances(const Exec &exec, const OtherExec &other_exec)