From aba90cd608eb65ab459cd71a6724511a1507763b Mon Sep 17 00:00:00 2001 From: James Conroy Date: Fri, 6 Nov 2020 16:28:18 +0000 Subject: IVGCVSW-5091 Add Logical ops frontend and ref impl * Add frontend and reference implementation for logical ops NOT, AND, OR. * Unary NOT uses existing ElementwiseUnary layer and ElementwiseUnary descriptor. * Binary AND/OR uses new layer LogicalBinary and new LogicalBinary descriptor. * Add serialization/deserializion support and add missing ElementwiseUnary deserializer code. * Add additional Boolean decoder in BaseIterator.hpp. Signed-off-by: James Conroy Change-Id: Id343b01174053a166de1b98b6175e04a5065f720 --- .../reference/workloads/ElementwiseFunction.hpp | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/backends/reference/workloads/ElementwiseFunction.hpp') diff --git a/src/backends/reference/workloads/ElementwiseFunction.hpp b/src/backends/reference/workloads/ElementwiseFunction.hpp index 8259ba5ac7..ef4a2dc7d5 100644 --- a/src/backends/reference/workloads/ElementwiseFunction.hpp +++ b/src/backends/reference/workloads/ElementwiseFunction.hpp @@ -37,4 +37,30 @@ struct ElementwiseUnaryFunction Encoder& outData); }; +template +struct LogicalBinaryFunction +{ + using OutType = bool; + using InType = bool; + + LogicalBinaryFunction(const TensorShape& inShape0, + const TensorShape& inShape1, + const TensorShape& outShape, + Decoder& inData0, + Decoder& inData1, + Encoder& outData); +}; + +template +struct LogicalUnaryFunction +{ + using OutType = bool; + using InType = bool; + + LogicalUnaryFunction(const TensorShape& inShape, + const TensorShape& outShape, + Decoder& inData, + Encoder& outData); +}; + } //namespace armnn -- cgit v1.2.1