aboutsummaryrefslogtreecommitdiff
path: root/tests/validation/reference/ElementWiseUnary.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/validation/reference/ElementWiseUnary.cpp')
-rw-r--r--tests/validation/reference/ElementWiseUnary.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/validation/reference/ElementWiseUnary.cpp b/tests/validation/reference/ElementWiseUnary.cpp
index ae7f256339..79310eae0f 100644
--- a/tests/validation/reference/ElementWiseUnary.cpp
+++ b/tests/validation/reference/ElementWiseUnary.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2018 ARM Limited.
+ * Copyright (c) 2018-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -46,6 +46,9 @@ SimpleTensor<T> elementwise_unary(const SimpleTensor<T> &src, ElementWiseUnary o
case ElementWiseUnary::EXP:
dst[i] = std::exp(src[i]);
break;
+ case ElementWiseUnary::NEG:
+ dst[i] = -src[i];
+ break;
default:
ARM_COMPUTE_ERROR("Not implemented");
}
@@ -56,6 +59,7 @@ SimpleTensor<T> elementwise_unary(const SimpleTensor<T> &src, ElementWiseUnary o
template SimpleTensor<float> elementwise_unary(const SimpleTensor<float> &src, ElementWiseUnary op);
template SimpleTensor<half> elementwise_unary(const SimpleTensor<half> &src, ElementWiseUnary op);
+template SimpleTensor<int32_t> elementwise_unary(const SimpleTensor<int32_t> &src, ElementWiseUnary op);
} // namespace reference
} // namespace validation
} // namespace test