aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorJohn Richardson <john.richardson@arm.com>2017-11-27 14:35:09 +0000
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:42:33 +0000
commit25f23680b211b6dd27c006cb9575e816e8f80bb5 (patch)
treef46132851600739d8d05f7bf8e3b9b0896bd39bf /utils
parent1d25ed54a948639d1894c8b021940df70005d519 (diff)
downloadComputeLibrary-25f23680b211b6dd27c006cb9575e816e8f80bb5.tar.gz
COMPMID-589: Port HOGDescriptor to new validation
Change-Id: I2021612e61de1b82aaeb49249d06929c7fceb15f Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/115216 Reviewed-by: Pablo Tello <pablo.tello@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/TypePrinter.h71
1 files changed, 70 insertions, 1 deletions
diff --git a/utils/TypePrinter.h b/utils/TypePrinter.h
index 22e6554224..5805ee6ed0 100644
--- a/utils/TypePrinter.h
+++ b/utils/TypePrinter.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017 ARM Limited.
+ * Copyright (c) 2017, 2018 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -26,6 +26,8 @@
#include "arm_compute/core/Dimensions.h"
#include "arm_compute/core/Error.h"
+#include "arm_compute/core/HOGInfo.h"
+#include "arm_compute/core/Size2D.h"
#include "arm_compute/core/Strides.h"
#include "arm_compute/core/TensorInfo.h"
#include "arm_compute/core/Types.h"
@@ -856,5 +858,72 @@ inline std::string to_string(const arm_compute::GradientDimension &type)
str << type;
return str.str();
}
+
+/** Formatted output of the HOGNormType type. */
+inline ::std::ostream &operator<<(::std::ostream &os, const HOGNormType &norm_type)
+{
+ switch(norm_type)
+ {
+ case HOGNormType::L1_NORM:
+ os << "L1_NORM";
+ break;
+ case HOGNormType::L2_NORM:
+ os << "L2_NORM";
+ break;
+ case HOGNormType::L2HYS_NORM:
+ os << "L2HYS_NORM";
+ break;
+ default:
+ ARM_COMPUTE_ERROR("NOT_SUPPORTED!");
+ }
+
+ return os;
+}
+
+inline std::string to_string(const HOGNormType &type)
+{
+ std::stringstream str;
+ str << type;
+ return str.str();
+}
+
+/** Formatted output of the Size2D type. */
+inline ::std::ostream &operator<<(::std::ostream &os, const Size2D &size)
+{
+ os << size.width << "x" << size.height;
+
+ return os;
+}
+
+inline std::string to_string(const Size2D &type)
+{
+ std::stringstream str;
+ str << type;
+ return str.str();
+}
+
+/** Formatted output of the Size2D type. */
+inline ::std::ostream &operator<<(::std::ostream &os, const HOGInfo &hog_info)
+{
+ os << "{CellSize=" << hog_info.cell_size() << ","
+ << "BlockSize=" << hog_info.block_size() << ","
+ << "DetectionWindowSize=" << hog_info.detection_window_size() << ","
+ << "BlockStride=" << hog_info.block_stride() << ","
+ << "NumBins=" << hog_info.num_bins() << ","
+ << "NormType=" << hog_info.normalization_type() << ","
+ << "L2HystThreshold=" << hog_info.l2_hyst_threshold() << ","
+ << "PhaseType=" << hog_info.phase_type() << "}";
+
+ return os;
+}
+
+/** Formatted output of the HOGInfo type. */
+inline std::string to_string(const HOGInfo &type)
+{
+ std::stringstream str;
+ str << type;
+ return str.str();
+}
+
} // namespace arm_compute
#endif /* __ARM_COMPUTE_TEST_TYPE_PRINTER_H__ */