diff options
Diffstat (limited to 'arm_compute/runtime/CPP/CPPScheduler.h')
-rw-r--r-- | arm_compute/runtime/CPP/CPPScheduler.h | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/arm_compute/runtime/CPP/CPPScheduler.h b/arm_compute/runtime/CPP/CPPScheduler.h index 764af818d9..7f70b5fa1f 100644 --- a/arm_compute/runtime/CPP/CPPScheduler.h +++ b/arm_compute/runtime/CPP/CPPScheduler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2020 Arm Limited. + * Copyright (c) 2016-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -31,7 +31,14 @@ namespace arm_compute { -/** C++11 implementation of a pool of threads to automatically split a kernel's execution among several threads. */ +/** C++11 implementation of a pool of threads to automatically split a kernel's execution among several threads. + * + * It has 2 scheduling modes: Linear or Fanout (please refer to the implementation for details) + * The mode is selected automatically based on the runtime environment. However it can be forced via an environment + * variable ARM_COMPUTE_CPP_SCHEDULER_MODE. e.g.: + * ARM_COMPUTE_CPP_SCHEDULER_MODE=linear # Force select the linear scheduling mode + * ARM_COMPUTE_CPP_SCHEDULER_MODE=fanout # Force select the fanout scheduling mode +*/ class CPPScheduler final : public IScheduler { public: @@ -42,17 +49,17 @@ public: /** Access the scheduler singleton * - * @note this method has been deprecated and will be remover in the upcoming releases + * @note this method has been deprecated and will be remover in future releases * @return The scheduler */ static CPPScheduler &get(); // Inherited functions overridden - void set_num_threads(unsigned int num_threads) override; - void set_num_threads_with_affinity(unsigned int num_threads, BindFunc func) override; + void set_num_threads(unsigned int num_threads) override; + void set_num_threads_with_affinity(unsigned int num_threads, BindFunc func) override; unsigned int num_threads() const override; - void schedule(ICPPKernel *kernel, const Hints &hints) override; - void schedule_op(ICPPKernel *kernel, const Hints &hints, ITensorPack &tensors) override; + void schedule(ICPPKernel *kernel, const Hints &hints) override; + void schedule_op(ICPPKernel *kernel, const Hints &hints, const Window &window, ITensorPack &tensors) override; protected: /** Will run the workloads in parallel using num_threads |