#pragma once #include namespace saw { namespace rmt { struct Kokkos {}; } template struct remote; template struct remote_ctx; template<> class remote_ctx { private: Kokkos::ScopeGuard guard_; SAW_FORBID_COPY(remote_ctx); SAW_FORBID_MOVE(remote_ctx); public: remote_ctx(Kokkos::InitializationSettings init_settings): guard_{std::move(init_settings)} {} error_or create_remote(){ return remote{*this}; } }; template<> struct remote { private: remote_ctx* ctx_; SAW_FORBID_COPY(remote); SAW_FORBID_MOVE(remote); public: remote(remote_ctx& r_ctx): ctx_{&r_ctx} {} template error }; }