5#ifndef GKO_PUBLIC_CORE_BASE_SCOPED_DEVICE_ID_GUARD_HPP_
6#define GKO_PUBLIC_CORE_BASE_SCOPED_DEVICE_ID_GUARD_HPP_
16class ReferenceExecutor;
29class generic_scoped_device_id_guard {
31 generic_scoped_device_id_guard() =
default;
35 virtual ~generic_scoped_device_id_guard() =
default;
38 generic_scoped_device_id_guard(
39 const generic_scoped_device_id_guard& other) =
delete;
42 generic_scoped_device_id_guard& operator=(
43 const generic_scoped_device_id_guard& other) =
delete;
147 std::unique_ptr<detail::generic_scoped_device_id_guard> scope_;
This is the Executor subclass which represents the CUDA device.
Definition executor.hpp:1485
This is the Executor subclass which represents a DPC++ enhanced device.
Definition executor.hpp:1901
This is the Executor subclass which represents the HIP enhanced device.
Definition executor.hpp:1703
This is the Executor subclass which represents the OpenMP device (typically CPU).
Definition executor.hpp:1338
This is a specialization of the OmpExecutor, which runs the reference implementations of the kernels ...
Definition executor.hpp:1415
This move-only class uses RAII to set the device id within a scoped block, if necessary.
Definition scoped_device_id_guard.hpp:76
scoped_device_id_guard(const DpcppExecutor *exec, int device_id)
Create a scoped device id from an DpcppExecutor.
scoped_device_id_guard(const OmpExecutor *exec, int device_id)
Create a scoped device id from an OmpExecutor.
scoped_device_id_guard(const HipExecutor *exec, int device_id)
Create a scoped device id from an HipExecutor.
scoped_device_id_guard(const CudaExecutor *exec, int device_id)
Create a scoped device id from an CudaExecutor.
scoped_device_id_guard(const ReferenceExecutor *exec, int device_id)
Create a scoped device id from an Reference.
The Ginkgo namespace.
Definition abstract_factory.hpp:20