blob: ad5d3101a2a35f8ebec9e60684989114d732f6a0 [file] [log] [blame]
Jim Flynn4b2f3472021-10-13 21:20:07 +01001//
2// Copyright © 2021 Arm Ltd and Contributors. All rights reserved.
3// SPDX-License-Identifier: MIT
4//
5
6
7#include "SharedFunctions.hpp"
8
9#include "DelegateUtils.hpp"
10
11#include <tensorflow/lite/builtin_ops.h>
12#include <tensorflow/lite/c/builtin_op_data.h>
13#include <tensorflow/lite/c/common.h>
14#include <tensorflow/lite/minimal_logging.h>
15
16namespace armnnDelegate
17{
18
19TfLiteStatus ValidateFloorOperator(DelegateData& delegateData,
20 TfLiteContext* tfLiteContext,
21 const armnn::TensorInfo& inputTensorInfo,
22 const armnn::TensorInfo& outputTensorInfo)
23{
24 bool isSupported = false;
25 auto validateFunc = [&](const armnn::TensorInfo& outInfo, bool& isSupported)
26 {
Sadik Armaganbfa767c2022-02-09 14:58:03 +000027 FORWARD_LAYER_SUPPORT_FUNC("FLOOR",
Jim Flynn4b2f3472021-10-13 21:20:07 +010028 tfLiteContext,
29 IsFloorSupported,
30 delegateData.m_Backends,
31 isSupported,
32 inputTensorInfo,
33 outInfo);
34 };
35 validateFunc(outputTensorInfo, isSupported);
36 return isSupported ? kTfLiteOk : kTfLiteError;
37}
38
39} // namespace armnnDelegate
40