diff options
author | Anthony Barbier <anthony.barbier@arm.com> | 2018-05-25 13:32:10 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:52:54 +0000 |
commit | 52ecb06b5627902a2f4514fba977e98454af4872 (patch) | |
tree | 7e66afcd6a81d2a5d7f886d5d2d0f4e27cc6c4d1 /arm_compute/runtime/CPP | |
parent | df473eab0ab8a52e6b58e0f6442b39ba4c1d68ea (diff) | |
download | ComputeLibrary-52ecb06b5627902a2f4514fba977e98454af4872.tar.gz |
COMPMID-1180: Add support for bucket multi-threading (Part 1)
- Add an entry point to allow the user to parallelise an arbitrary queue of workloads (Will be used to interleave GEMM / BufferManager)
- Added a ThreadFeeder which acts as a thread-safe work distributor
Change-Id: I3a84fb7446c453cfcd337e21338c2ccf9f29f7b3
Note: This patch doesn't introduce any change in the default strategy, therefore it shouldn't have any impact on the performance
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/133058
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com>
Diffstat (limited to 'arm_compute/runtime/CPP')
-rw-r--r-- | arm_compute/runtime/CPP/CPPScheduler.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arm_compute/runtime/CPP/CPPScheduler.h b/arm_compute/runtime/CPP/CPPScheduler.h index 17da7aeb78..6462ac6f2c 100644 --- a/arm_compute/runtime/CPP/CPPScheduler.h +++ b/arm_compute/runtime/CPP/CPPScheduler.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, 2017 ARM Limited. + * Copyright (c) 2016-2018 ARM Limited. * * SPDX-License-Identifier: MIT * @@ -30,8 +30,6 @@ namespace arm_compute { -class Thread; - /** C++11 implementation of a pool of threads to automatically split a kernel's execution among several threads. */ class CPPScheduler : public IScheduler { @@ -63,7 +61,14 @@ public: */ void schedule(ICPPKernel *kernel, unsigned int split_dimension) override; + /** Will run the workloads in parallel using num_threads + * + * @param[in] workloads Workloads to run + */ + void run_workloads(std::vector<Workload> &workloads) override; + private: + class Thread; /** Constructor: create a pool of threads. */ CPPScheduler(); |