diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-06-28 10:15:48 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:42 +0100 |
commit | d929b9c49a13eb9c05bb4fab608459669eeeeb9e (patch) | |
tree | ed0101971fe0d8c112f715d47a53aae306031d93 /src/runtime/CPP | |
parent | 725788e33c163f95a6fdc054b6b78296ed7dfe50 (diff) | |
download | ComputeLibrary-d929b9c49a13eb9c05bb4fab608459669eeeeb9e.tar.gz |
COMPMID-417: Enable CPU target selection
Change-Id: I8d1b368c654b738117efb32cfacd5fda10c23203
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79046
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'src/runtime/CPP')
-rw-r--r-- | src/runtime/CPP/CPPScheduler.cpp | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/runtime/CPP/CPPScheduler.cpp b/src/runtime/CPP/CPPScheduler.cpp index 886933074d..2a321a1101 100644 --- a/src/runtime/CPP/CPPScheduler.cpp +++ b/src/runtime/CPP/CPPScheduler.cpp @@ -161,14 +161,10 @@ CPPScheduler &CPPScheduler::get() return scheduler; } -unsigned int CPPScheduler::num_threads() const -{ - return _num_threads; -} - CPPScheduler::CPPScheduler() : _num_threads(std::thread::hardware_concurrency()), - _threads(std::unique_ptr<Thread[], void(*)(Thread *)>(new Thread[std::thread::hardware_concurrency() - 1], delete_threads)) + _threads(std::unique_ptr<Thread[], void(*)(Thread *)>(new Thread[std::thread::hardware_concurrency() - 1], delete_threads)), + _target(CPUTarget::INTRINSICS) { } @@ -178,6 +174,21 @@ void CPPScheduler::set_num_threads(unsigned int num_threads) _num_threads = num_threads == 0 ? num_cores : num_threads; } +unsigned int CPPScheduler::num_threads() const +{ + return _num_threads; +} + +void CPPScheduler::set_target(CPUTarget target) +{ + _target = target; +} + +CPUTarget CPPScheduler::target() const +{ + return _target; +} + void CPPScheduler::schedule(ICPPKernel *kernel, unsigned int split_dimension) { ARM_COMPUTE_ERROR_ON_MSG(!kernel, "The child class didn't set the kernel"); |