IVGCVSW-3722 Add function to specify min or max in ArgMinMaxDescriptor
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I2f9d9968cbfda3ec3eadbe9a746e93e816989a3d
diff --git a/include/armnn/Descriptors.hpp b/include/armnn/Descriptors.hpp
index 87f4bdb..e871e89 100644
--- a/include/armnn/Descriptors.hpp
+++ b/include/armnn/Descriptors.hpp
@@ -34,8 +34,12 @@
struct ArgMinMaxDescriptor
{
ArgMinMaxDescriptor()
- : m_Axis(-1) {}
+ : m_Function(ArgMinMaxFunction::Min)
+ , m_Axis(-1) {}
+ /// Specify if the function is to find Min or Max.
+ ArgMinMaxFunction m_Function;
+ /// Axis to reduce across the input tensor.
int m_Axis;
};
diff --git a/include/armnn/Types.hpp b/include/armnn/Types.hpp
index 6d8ea6f..dbcb91a 100644
--- a/include/armnn/Types.hpp
+++ b/include/armnn/Types.hpp
@@ -54,6 +54,12 @@
Square = 9
};
+enum class ArgMinMaxFunction
+{
+ Min = 0,
+ Max = 1
+};
+
enum class PoolingAlgorithm
{
Max = 0,