diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2018-02-01 20:23:25 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:45:42 +0000 |
commit | 53d12277563f860852532ace2a6c796384d969dd (patch) | |
tree | e445c005cecea4f44cb2ab51abce82a66181c166 /arm_compute/runtime | |
parent | b7e3028a2bf81ca247895b8550f5a5da02d2483e (diff) | |
download | ComputeLibrary-53d12277563f860852532ace2a6c796384d969dd.tar.gz |
COMPMID-874: Improve default number of threads choice in the Scheduler
Change-Id: Ia30ec2afce0aafcd39f41440efb972b18bbda9f8
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/118657
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Pablo Tello <pablo.tello@arm.com>
Diffstat (limited to 'arm_compute/runtime')
-rw-r--r-- | arm_compute/runtime/IScheduler.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arm_compute/runtime/IScheduler.h b/arm_compute/runtime/IScheduler.h index 8918843c98..1dd7c2cfb2 100644 --- a/arm_compute/runtime/IScheduler.h +++ b/arm_compute/runtime/IScheduler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 ARM Limited. + * Copyright (c) 2017-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -70,9 +70,20 @@ public: * @return CPU info. */ CPUInfo cpu_info() const; + /** Get a hint for the best possible number of execution threads + * + * @warning In case we can't work out the best number of threads, + * std::thread::hardware_concurrency() is returned else 1 in case of bare metal builds + * + * @return Best possible number of execution threads to use + */ + unsigned int num_threads_hint() const; protected: CPUInfo _info{}; + +private: + unsigned int _num_threads_hint = {}; }; } #endif /* __ARM_COMPUTE_ISCHEDULER_H__ */ |