From 8d94269d7985b9cee67e52581e2f58b6c99d7f0d Mon Sep 17 00:00:00 2001 From: John Kesapides Date: Tue, 26 Feb 2019 14:52:12 +0000 Subject: COMPMID-1492 Create tests/validate_examples/graph_depthwise_convolution Add new validate graph example and unify common example code Change-Id: Ibfd7ae2067ad805d6c82d953fe3febfbea961149 Signed-off-by: John Kesapides Reviewed-on: https://review.mlplatform.org/c/825 Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- arm_compute/graph/TypeLoader.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'arm_compute') diff --git a/arm_compute/graph/TypeLoader.h b/arm_compute/graph/TypeLoader.h index dcdc1736a7..41f382ad1d 100644 --- a/arm_compute/graph/TypeLoader.h +++ b/arm_compute/graph/TypeLoader.h @@ -123,6 +123,30 @@ inline ::std::istream &operator>>(::std::istream &stream, ConvolutionMethod &tar target = Convolution_method_from_name(value); return stream; } + +/** Converts a string to a strong types enumeration @ref DepthwiseConvolutionMethod + * + * @param[in] name String to convert + * + * @return Converted Target enumeration + */ +DepthwiseConvolutionMethod depthwise_convolution_method_from_name(const std::string &name); + +/** Input Stream operator for @ref DepthwiseConvolutionMethod + * + * @param[in] stream Stream to parse + * @param[out] target Output target + * + * @return Updated stream + */ +inline ::std::istream &operator>>(::std::istream &stream, DepthwiseConvolutionMethod &target) +{ + std::string value; + stream >> value; + target = depthwise_convolution_method_from_name(value); + return stream; +} + } // namespace graph } // namespace arm_compute #endif /* __ARM_COMPUTE_GRAPH_TYPE_LOADER_H__ */ -- cgit v1.2.1