ReferenceExecutor Class Reference#
|
Reference API
|
#include <ginkgo/core/base/executor.hpp>
Public Member Functions | |
| scoped_device_id_guard | get_scoped_device_id_guard () const override |
| std::string | get_description () const override |
| void | run (const Operation &op) const override |
| virtual void | run (const Operation &op) const=0 |
| template<typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp > | |
| void | run (const ClosureOmp &op_omp, const ClosureCuda &op_cuda, const ClosureHip &op_hip, const ClosureDpcpp &op_dpcpp) const |
| template<typename ClosureReference , typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp > | |
| void | run (std::string name, const ClosureReference &op_ref, const ClosureOmp &op_omp, const ClosureCuda &op_cuda, const ClosureHip &op_hip, const ClosureDpcpp &op_dpcpp) const |
Public Member Functions inherited from gko::OmpExecutor | |
| std::shared_ptr< Executor > | get_master () noexcept override |
| std::shared_ptr< const Executor > | get_master () const noexcept override |
| void | synchronize () const override |
| int | get_num_cores () const |
| int | get_num_threads_per_core () const |
| template<typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp > | |
| void | run (const ClosureOmp &op_omp, const ClosureCuda &op_cuda, const ClosureHip &op_hip, const ClosureDpcpp &op_dpcpp) const |
| template<typename ClosureReference , typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp > | |
| void | run (std::string name, const ClosureReference &op_ref, const ClosureOmp &op_omp, const ClosureCuda &op_cuda, const ClosureHip &op_hip, const ClosureDpcpp &op_dpcpp) const |
Static Public Member Functions | |
| static std::shared_ptr< ReferenceExecutor > | create (std::shared_ptr< CpuAllocatorBase > alloc=std::make_shared< CpuAllocator >()) |
Static Public Member Functions inherited from gko::OmpExecutor | |
| static std::shared_ptr< OmpExecutor > | create (std::shared_ptr< CpuAllocatorBase > alloc=std::make_shared< CpuAllocator >()) |
| static int | get_num_omp_threads () |
Protected Member Functions | |
| ReferenceExecutor (std::shared_ptr< CpuAllocatorBase > alloc) | |
| void | populate_exec_info (const machine_topology *) override |
| bool | verify_memory_from (const Executor *src_exec) const override |
| virtual bool | verify_memory_to (const ReferenceExecutor *other) const override |
| virtual bool | verify_memory_to (const OmpExecutor *other) const override |
| virtual bool | verify_memory_to (const DpcppExecutor *other) const override |
| virtual bool | verify_memory_to (const CudaExecutor *other) const override |
| virtual bool | verify_memory_to (const HipExecutor *other) const override |
Protected Member Functions inherited from gko::OmpExecutor | |
| OmpExecutor (std::shared_ptr< CpuAllocatorBase > alloc) | |
| void * | raw_alloc (size_type size) const override |
| void | raw_free (void *ptr) const noexcept override |
| void | raw_copy_to (const OmpExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
| void | raw_copy_to (const HipExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
| void | raw_copy_to (const DpcppExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
| void | raw_copy_to (const CudaExecutor *dest_exec, size_type n_bytes, const void *src_ptr, void *dest_ptr) const override |
Additional Inherited Members | |
Protected Attributes inherited from gko::OmpExecutor | |
| std::shared_ptr< CpuAllocatorBase > | alloc_ |
Detailed Description
This is a specialization of the OmpExecutor, which runs the reference implementations of the kernels used for debugging purposes.
Member Function Documentation
◆ get_description()
|
inlineoverridevirtual |
- Returns
- a textual representation of the executor and its device.
Reimplemented from gko::OmpExecutor.
◆ get_scoped_device_id_guard()
|
inlineoverridevirtual |
Reimplemented from gko::OmpExecutor.
◆ populate_exec_info()
|
inlineoverrideprotectedvirtual |
Populates the executor specific info from the global machine topology object.
- Parameters
-
mach_topo the machine topology object.
Reimplemented from gko::OmpExecutor.
◆ run() [1/4]
|
inline |
Runs one of the passed in functors, depending on the Executor type.
- Template Parameters
-
ClosureOmp type of op_omp ClosureCuda type of op_cuda ClosureHip type of op_hip ClosureDpcpp type of op_dpcpp
- Parameters
-
op_omp functor to run in case of a OmpExecutor or ReferenceExecutor op_cuda functor to run in case of a CudaExecutor op_hip functor to run in case of a HipExecutor op_dpcpp functor to run in case of a DpcppExecutor
◆ run() [2/4]
|
inlineoverridevirtual |
Runs the specified Operation using this Executor.
- Parameters
-
op the operation to run
Reimplemented from gko::OmpExecutor.
◆ run() [3/4]
|
virtual |
Runs the specified Operation using this Executor.
- Parameters
-
op the operation to run
Reimplemented from gko::OmpExecutor.
◆ run() [4/4]
|
inline |
Runs one of the passed in functors, depending on the Executor type.
- Template Parameters
-
ClosureReference type of op_ref ClosureOmp type of op_omp ClosureCuda type of op_cuda ClosureHip type of op_hip ClosureDpcpp type of op_dpcpp
- Parameters
-
name the name of the operation op_ref functor to run in case of a ReferenceExecutor op_omp functor to run in case of a OmpExecutor op_cuda functor to run in case of a CudaExecutor op_hip functor to run in case of a HipExecutor op_dpcpp functor to run in case of a DpcppExecutor
◆ verify_memory_from()
|
inlineoverrideprotectedvirtual |
Verify the memory from another Executor.
- Parameters
-
src_exec Executor from which to verify the memory.
- Returns
- whether this executor and src_exec share the same memory.
Implements gko::Executor.
◆ verify_memory_to() [1/5]
|
inlineoverrideprotectedvirtual |
Reimplemented from gko::OmpExecutor.
◆ verify_memory_to() [2/5]
|
inlineoverrideprotectedvirtual |
Reimplemented from gko::OmpExecutor.
◆ verify_memory_to() [3/5]
|
inlineoverrideprotectedvirtual |
Reimplemented from gko::OmpExecutor.
◆ verify_memory_to() [4/5]
|
inlineoverrideprotectedvirtual |
Reimplemented from gko::OmpExecutor.
◆ verify_memory_to() [5/5]
|
inlineoverrideprotectedvirtual |
Reimplemented from gko::OmpExecutor.
The documentation for this class was generated from the following file:
- ginkgo/core/base/executor.hpp
Generated by
Public Member Functions inherited from