CLAMP limits should be expressed in in_out_t

int8/int16 should be used for the clamping, not int32_t

Signed-off-by: Eric Kunze <eric.kunze@arm.com>
Change-Id: I18209ca76cc83d95dc61f20f88344aafdbd72033
diff --git a/reference_model/src/ops/activation_funcs.cc b/reference_model/src/ops/activation_funcs.cc
index c8fdc74..1f4c3b3 100644
--- a/reference_model/src/ops/activation_funcs.cc
+++ b/reference_model/src/ops/activation_funcs.cc
@@ -52,12 +52,19 @@
             this->fcn = [min, max](InEigenType a) -> OutEigenType { return (a <= min ? min : a >= max ? max : a); };
         }
         break;
-        case TOSA_REF_TYPE_INT8:
-        case TOSA_REF_TYPE_INT16: {
-            InEigenType min = (InEigenType)attribute->min_int();
-            InEigenType max = (InEigenType)attribute->max_int();
+        case TOSA_REF_TYPE_INT8: {
+            int8_t min = (int8_t)attribute->min_int();
+            int8_t max = (int8_t)attribute->max_int();
+
             ERROR_IF(max < min, "OpClamp: max smaller than min");
-            this->fcn = [min, max](InEigenType a) -> OutEigenType { return a <= min ? min : a >= max ? max : a; };
+            this->fcn = [min, max](int8_t a) -> int8_t { return a <= min ? min : a >= max ? max : a; };
+        }
+        case TOSA_REF_TYPE_INT16: {
+            int16_t min = (int16_t)attribute->min_int();
+            int16_t max = (int16_t)attribute->max_int();
+
+            ERROR_IF(max < min, "OpClamp: max smaller than min");
+            this->fcn = [min, max](int16_t a) -> int16_t { return a <= min ? min : a >= max ? max : a; };
         }
         break;
         default: