diff options
author | Moritz Pflanzer <moritz.pflanzer@arm.com> | 2017-07-05 10:52:21 +0100 |
---|---|---|
committer | Anthony Barbier <anthony.barbier@arm.com> | 2018-09-17 14:16:42 +0100 |
commit | ee493ae23b8cd6de5a6c578cea34bccb478d2f64 (patch) | |
tree | 154d1f8652f659128d3d76a1ac49cc942816b090 /tests/TypePrinter.h | |
parent | d7a5d22dd6b2a968469ea511f11907b131ec1c67 (diff) | |
download | ComputeLibrary-ee493ae23b8cd6de5a6c578cea34bccb478d2f64.tar.gz |
COMPMID-415: Port benchmark tests and remove google benchmark
Change-Id: I2f17720a4e974b2cc4481f2884d9f351e8f78b5f
Reviewed-on: http://mpd-gerrit.cambridge.arm.com/79776
Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Reviewed-by: Anthony Barbier <anthony.barbier@arm.com>
Diffstat (limited to 'tests/TypePrinter.h')
-rw-r--r-- | tests/TypePrinter.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/TypePrinter.h b/tests/TypePrinter.h index c4f3495761..75499065eb 100644 --- a/tests/TypePrinter.h +++ b/tests/TypePrinter.h @@ -29,6 +29,8 @@ #include "arm_compute/core/Types.h" #include <ostream> +#include <sstream> +#include <string> namespace arm_compute { @@ -53,6 +55,22 @@ inline ::std::ostream &operator<<(::std::ostream &os, const Dimensions<T> &dimen return os; } +//FIXME: Check why this doesn't work and the TensorShape overload is needed +template <typename T> +inline std::string to_string(const Dimensions<T> &dimensions) +{ + std::stringstream str; + str << dimensions; + return str.str(); +} + +inline std::string to_string(const TensorShape &shape) +{ + std::stringstream str; + str << shape; + return str.str(); +} + /** Formatted output of the Rectangle type. */ inline ::std::ostream &operator<<(::std::ostream &os, const Rectangle &rect) { @@ -231,6 +249,13 @@ inline ::std::ostream &operator<<(::std::ostream &os, const ActivationLayerInfo: return os; } +inline std::string to_string(const arm_compute::ActivationLayerInfo &info) +{ + std::stringstream str; + str << info.activation(); + return str.str(); +} + /** Formatted output of the NormType type. */ inline ::std::ostream &operator<<(::std::ostream &os, const NormType &norm_type) { @@ -252,6 +277,13 @@ inline ::std::ostream &operator<<(::std::ostream &os, const NormType &norm_type) return os; } +inline std::string to_string(const arm_compute::NormalizationLayerInfo &info) +{ + std::stringstream str; + str << info.type(); + return str.str(); +} + /** Formatted output of the PoolingType type. */ inline ::std::ostream &operator<<(::std::ostream &os, const PoolingType &pool_type) { @@ -270,6 +302,14 @@ inline ::std::ostream &operator<<(::std::ostream &os, const PoolingType &pool_ty return os; } +/** Formatted output of @ref PoolingLayerInfo. */ +inline ::std::ostream &operator<<(::std::ostream &os, const PoolingLayerInfo &info) +{ + os << info.pool_type(); + + return os; +} + /** Formatted output of the RoundingPolicy type. */ inline ::std::ostream &operator<<(::std::ostream &os, const RoundingPolicy &rounding_policy) { @@ -348,6 +388,13 @@ inline ::std::ostream &operator<<(::std::ostream &os, const DataType &data_type) return os; } +inline std::string to_string(const arm_compute::DataType &data_type) +{ + std::stringstream str; + str << data_type; + return str.str(); +} + /** Formatted output of the Format type. */ inline ::std::ostream &operator<<(::std::ostream &os, const Format &format) { |