diff options
author | Georgios Pinitas <georgios.pinitas@arm.com> | 2017-07-05 17:02:25 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:15:39 +0100 |
commit | ac4e873dad6aa6291fc36aff62047a896db04f6a (patch) | |
tree | 2c5397c6c04b97cedb88ff809f5d40cbe7dc79c9 /tests/validation/ReferenceCPP.cpp | |
parent | df24618b53cffed1c574e11e9fd4ba7740f8c009 (diff) | |
download | ComputeLibrary-ac4e873dad6aa6291fc36aff62047a896db04f6a.tar.gz |
COMPMID-417: Port DepthConcatenate to QS8/QS16 for NEON/CL.
Change-Id: I3dddae63043c7aa18d908a4fc8abacf3c64f98ca
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/80081
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Steven Niu <steven.niu@arm.com>
Diffstat (limited to 'tests/validation/ReferenceCPP.cpp')
-rw-r--r-- | tests/validation/ReferenceCPP.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/validation/ReferenceCPP.cpp b/tests/validation/ReferenceCPP.cpp index c89b737598..105bfc4b6c 100644 --- a/tests/validation/ReferenceCPP.cpp +++ b/tests/validation/ReferenceCPP.cpp @@ -36,7 +36,9 @@ #include "boost_wrapper.h" +#include <algorithm> #include <functional> +#include <memory> #include <numeric> #include <vector> @@ -292,6 +294,19 @@ void ReferenceCPP::convolution_layer(const RawTensor &src, const RawTensor &weig boost::apply_visitor(tensor_visitors::convolution_layer_visitor(s, w, b, conv_info), d); } +// Depth concatenate layer +void ReferenceCPP::depth_concatenate_layer(const std::vector<std::unique_ptr<RawTensor>> &srcs, RawTensor &dst) +{ + std::vector<TensorVariant> ss; + ss.resize(srcs.size()); + std::transform(srcs.begin(), srcs.end(), ss.begin(), [](std::unique_ptr<RawTensor> const & t) + { + return TensorFactory::get_tensor(*t); + }); + TensorVariant d = TensorFactory::get_tensor(dst); + boost::apply_visitor(tensor_visitors::depth_concatenate_layer_visitor(ss), d); +} + // Fully connected layer void ReferenceCPP::fully_connected_layer(const RawTensor &src, const RawTensor &weights, const RawTensor &bias, RawTensor &dst) { |