aboutsummaryrefslogtreecommitdiff
path: root/arm_compute/core/Size2D.h
diff options
context:
space:
mode:
Diffstat (limited to 'arm_compute/core/Size2D.h')
-rw-r--r--arm_compute/core/Size2D.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arm_compute/core/Size2D.h b/arm_compute/core/Size2D.h
index 3840771cd1..37c4ebd041 100644
--- a/arm_compute/core/Size2D.h
+++ b/arm_compute/core/Size2D.h
@@ -24,6 +24,7 @@
#ifndef __ARM_COMPUTE_SIZE2D_H__
#define __ARM_COMPUTE_SIZE2D_H__
+#include "support/ToolchainSupport.h"
#include <cstddef>
#include <utility>
@@ -54,6 +55,21 @@ public:
return (width * height);
}
+ bool operator==(const Size2D &other) const
+ {
+ return (width == other.width) && (height == other.height);
+ }
+
+ bool operator!=(const Size2D &other) const
+ {
+ return !(*this == other);
+ }
+
+ std::string to_string() const
+ {
+ return support::cpp11::to_string(width) + std::string("x") + support::cpp11::to_string(height);
+ }
+
public:
size_t width = {}; /**< Width of the image region or rectangle */
size_t height = {}; /**< Height of the image region or rectangle */