Ginkgo: gko::ReferenceExecutor Class Reference (original) (raw)
This is a specialization of the OmpExecutor, which runs the reference implementations of the kernels used for debugging purposes. More...
#include <[ginkgo/core/base/executor.hpp](executor%5F8hpp%5Fsource.html)>
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 |
Runs the specified Operation using this Executor. More... | |
virtual void | run (const Operation &op) const=0 |
Runs the specified Operation using this Executor. More... | |
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 |
Runs one of the passed in functors, depending on the Executor type. More... | |
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 |
Runs one of the passed in functors, depending on the Executor type. More... | |
![]() |
|
std::shared_ptr< Executor > | get_master () noexcept override |
Returns the master OmpExecutor of this Executor. More... | |
std::shared_ptr< const Executor > | get_master () const noexcept override |
Returns the master OmpExecutor of this Executor. More... | |
void | synchronize () const override |
Synchronize the operations launched on the executor with its master. | |
int | get_num_cores () const |
int | get_num_threads_per_core () const |
virtual void | run (const Operation &op) const=0 |
Runs the specified Operation using this Executor. More... | |
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 |
Runs one of the passed in functors, depending on the Executor type. More... | |
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 |
Runs one of the passed in functors, depending on the Executor type. More... | |
Static Public Member Functions | |
---|---|
static std::shared_ptr< ReferenceExecutor > | create (std::shared_ptr< CpuAllocatorBase > alloc=std::make_shared< CpuAllocator >()) |
![]() |
|
static std::shared_ptr< OmpExecutor > | create (std::shared_ptr< CpuAllocatorBase > alloc=std::make_shared< CpuAllocator >()) |
Creates a new OmpExecutor. | |
static int | get_num_omp_threads () |
This is a specialization of the OmpExecutor, which runs the reference implementations of the kernels used for debugging purposes.
◆ get_description()
std::string gko::ReferenceExecutor::get_description ( ) const | inlineoverridevirtual |
---|
Returns
a textual representation of the executor and its device.
Reimplemented from gko::OmpExecutor.
◆ run() [1/4]
template<typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp >
void gko::Executor::run ( typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp ) | 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
◆ run() [2/4]
void gko::ReferenceExecutor::run ( const Operation & op) const | inlineoverridevirtual |
---|
◆ run() [3/4]
virtual void gko::Executor::run
◆ run() [4/4]
template<typename ClosureReference , typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp >
void gko::Executor::run ( typename ClosureReference , typename ClosureOmp , typename ClosureCuda , typename ClosureHip , typename ClosureDpcpp ) | 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 |
The documentation for this class was generated from the following file:
- ginkgo/core/base/executor.hpp