23.08
|
Configurable scheduler which supports multiple multithreading APIs and choosing between different schedulers at runtime. More...
#include <Scheduler.h>
Public Types | |
enum | Type { ST, CPP, OMP, CUSTOM } |
Scheduler type. More... | |
Static Public Member Functions | |
static void | set (std::shared_ptr< IScheduler > scheduler) |
Sets the user defined scheduler and makes it the active scheduler. More... | |
static IScheduler & | get () |
Access the scheduler singleton. More... | |
static void | set (Type t) |
Set the active scheduler. More... | |
static Type | get_type () |
Returns the type of the active scheduler. More... | |
static bool | is_available (Type t) |
Returns true if the given scheduler type is supported. More... | |
Configurable scheduler which supports multiple multithreading APIs and choosing between different schedulers at runtime.
Definition at line 35 of file Scheduler.h.
|
strong |
Scheduler type.
Enumerator | |
---|---|
ST | Single thread. |
CPP | C++11 threads. |
OMP | OpenMP. |
CUSTOM | Provided by the user. |
Definition at line 39 of file Scheduler.h.
|
static |
Access the scheduler singleton.
Definition at line 94 of file Scheduler.cpp.
References ARM_COMPUTE_ERROR, and Scheduler::CUSTOM.
Referenced by CpuDepthwiseConv2dAssemblyDispatch::configure(), CpuPool2d::configure(), CpuWinogradConv2d::configure(), CpuConv2d::get_convolution_method(), CpuGemmAssemblyDispatch::has_opt_impl(), main(), CpuFullyConnected::prepare(), CpuGemmLowpMatrixMultiplyCore::prepare(), CpuGemmConv2d::prepare(), NEQLSTMLayer::prepare(), ICPPSimpleFunction::run(), CpuDequantize::run(), CpuQuantize::run(), CpuConvertFullyConnectedWeights::run(), INESimpleFunction::run(), CpuActivation::run(), CpuAddMulAdd::run(), CpuScale::run(), NEFillBorder::run(), CpuPool3d::run(), CpuSub::run(), CpuConcatenate::run(), CpuAdd::run(), CpuPool2d::run(), CpuDepthwiseConv2dAssemblyDispatch::run(), CpuMul::run(), NEROIPoolingLayer::run(), CpuMatMul::run(), CpuSoftmaxGeneric< IS_LOG >::run(), NESpaceToDepthLayer::run(), NELogicalAnd::run(), CpuGemmLowpOutputStage::run(), CPPBoxWithNonMaximaSuppressionLimit::run(), CpuDirectConv2d::run(), CpuDirectConv3d::run(), CpuWinogradConv2d::run(), NEStackLayer::run(), NEFFT1D::run(), NEL2NormalizeLayer::run(), NERange::run(), NENormalizationLayer::run(), NEReductionOperation::run(), NEInstanceNormalizationLayer::run(), NEPadLayer::run(), NECropResize::run(), CpuComplexMul::run(), NEFuseBatchNormalization::run(), NEBatchNormalizationLayer::run(), NESpaceToBatchLayer::run(), CpuGemm::run(), NEGenerateProposalsLayer::run(), CpuGemmLowpMatrixMultiplyCore::run(), NESynthetizeFunctionWithZeroConstantKernelBorder< K >::run(), NELogicalOr::run(), CpuGemmConv2d::run(), NELogicalNot::run(), NEQLSTMLayer::run(), arm_compute::utils::schedule_kernel_on_ctx(), CpuQueue::scheduler(), NEDeviceBackend::setup_backend_context(), and SchedulerClock< output_timestamps >::test_start().
|
static |
Returns the type of the active scheduler.
Definition at line 89 of file Scheduler.cpp.
Referenced by SchedulerClock< output_timestamps >::test_start().
|
static |
Returns true if the given scheduler type is supported.
False otherwise.
[in] | t | the type of the scheduler to check. |
Definition at line 77 of file Scheduler.cpp.
References Scheduler::CUSTOM, and tf_frozen_model_extractor::t.
Referenced by Scheduler::set().
|
static |
Sets the user defined scheduler and makes it the active scheduler.
[in] | scheduler | A shared pointer to a custom scheduler implemented by the user. |
Definition at line 126 of file Scheduler.cpp.
References Scheduler::CUSTOM.
Referenced by SchedulerClock< output_timestamps >::test_start(), and SchedulerClock< output_timestamps >::test_stop().
|
static |
Set the active scheduler.
Only one scheduler can be enabled at any time.
[in] | t | the type of the scheduler to be enabled. |
Definition at line 71 of file Scheduler.cpp.
References ARM_COMPUTE_ERROR_ON, Scheduler::is_available(), and tf_frozen_model_extractor::t.