diff options
author | Pablo Tello <pablo.tello@arm.com> | 2018-03-14 17:55:27 +0000 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-11-02 16:49:16 +0000 |
commit | 7fad9b1d00f3ee1488ba4038d1371f6ea219f8b7 (patch) | |
tree | ded71e1cfa8e0c085f8bce5dfc26a99786d60e52 /src/runtime/CPP/CPPScheduler.cpp | |
parent | 1562be3e8a449360a90af75f6f1481a30d41be75 (diff) | |
download | ComputeLibrary-7fad9b1d00f3ee1488ba4038d1371f6ea219f8b7.tar.gz |
COMPMID-1021: CPUInfo refactoring.
Removed CPUTarget in favor of the CPUModel type.
CPUInfo now holds a vector of N CPUs.
CPUInfo autoinitialise upon construction with 1 GENERIC CPU.
CPPScheduler fills CPUInfo's vector upon construction (runtime).
IScheduler has a single CPUInfo obj and ThreadInfo always gets a pointer to it (avoid copying the vector)
Change-Id: I30f293258c959c87f6bac5eac8b963beb6a4d365
Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/124626
Tested-by: Jenkins <bsgcomp@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'src/runtime/CPP/CPPScheduler.cpp')
-rw-r--r-- | src/runtime/CPP/CPPScheduler.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/CPP/CPPScheduler.cpp b/src/runtime/CPP/CPPScheduler.cpp index 168ed6e30f..92dce34c71 100644 --- a/src/runtime/CPP/CPPScheduler.cpp +++ b/src/runtime/CPP/CPPScheduler.cpp @@ -27,6 +27,7 @@ #include "arm_compute/core/Error.h" #include "arm_compute/core/Helpers.h" #include "arm_compute/core/Utils.h" +#include "arm_compute/runtime/CPUUtils.h" #include <condition_variable> #include <iostream> @@ -159,6 +160,7 @@ CPPScheduler::CPPScheduler() : _num_threads(num_threads_hint()), _threads(_num_threads - 1) { + get_cpu_configuration(_cpu_info); } void CPPScheduler::set_num_threads(unsigned int num_threads) @@ -178,7 +180,7 @@ void CPPScheduler::schedule(ICPPKernel *kernel, unsigned int split_dimension) /** [Scheduler example] */ ThreadInfo info; - info.cpu_info = _info; + info.cpu_info = &_cpu_info; const Window &max_window = kernel->window(); const unsigned int num_iterations = max_window.num_iterations(split_dimension); |