From 7a6d11bf423bf7e67cc81074bb4745b0babf59c0 Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Wed, 3 Jul 2019 15:27:08 +0100 Subject: IVGCVSW-3295 Support ResizeNearestNeighbour in HAL1.2 driver * Added ConvertNearestNeighbor to 1.2/HalPolicy Signed-off-by: Aron Virginas-Tar Change-Id: I9858849b70be36e7e5ced3dae667c85c03e50d4f --- ConversionUtils.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'ConversionUtils.hpp') diff --git a/ConversionUtils.hpp b/ConversionUtils.hpp index 03f46696..36bc4ae1 100644 --- a/ConversionUtils.hpp +++ b/ConversionUtils.hpp @@ -581,6 +581,27 @@ const void* GetOperandValueReadOnlyAddress(const HalOperand& operand, return valueStart; } +template +bool GetOperandType(const HalOperation& operation, + uint32_t inputIndex, + const HalModel& model, + HalOperandType& type) +{ + using HalOperand = typename HalPolicy::Operand; + + const HalOperand* operand = GetInputOperand(operation, inputIndex, model); + if (!operand) + { + return Fail("%s: invalid input operand at index %i", __func__, inputIndex); + } + + type = operand->type; + return true; +} + template -- cgit v1.2.1