From 9e631c204444e7b095510c54819e944f9be8d342 Mon Sep 17 00:00:00 2001 From: Usama Arif Date: Tue, 14 May 2019 17:10:40 +0100 Subject: COMPMID-2252 NECast. Change-Id: I7532aea6827a325eb8457132d4787ac527e93cd4 Signed-off-by: Usama Arif Reviewed-on: https://review.mlplatform.org/c/1149 Reviewed-by: Pablo Marquez Comments-Addressed: Arm Jenkins Tested-by: Arm Jenkins Reviewed-by: Georgios Pinitas --- src/runtime/NEON/functions/NECast.cpp | 46 +++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/runtime/NEON/functions/NECast.cpp (limited to 'src/runtime/NEON/functions/NECast.cpp') diff --git a/src/runtime/NEON/functions/NECast.cpp b/src/runtime/NEON/functions/NECast.cpp new file mode 100644 index 0000000000..fe1e486ab1 --- /dev/null +++ b/src/runtime/NEON/functions/NECast.cpp @@ -0,0 +1,46 @@ +/* + * Copyright (c) 2019 ARM Limited. + * + * SPDX-License-Identifier: MIT + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ +#include "arm_compute/runtime/NEON/functions/NECast.h" + +#include "arm_compute/core/ITensor.h" +#include "arm_compute/core/TensorInfo.h" +#include "arm_compute/core/NEON/kernels/NEDepthConvertLayerKernel.h" +#include "support/ToolchainSupport.h" + +#include + +namespace arm_compute +{ +void NECast::configure(ITensor *input, ITensor *output, ConvertPolicy policy) +{ + auto k = arm_compute::support::cpp14::make_unique(); + k->configure(input, output, policy, 0); + _kernel = std::move(k); +} + +Status NECast::validate(ITensorInfo *input, ITensorInfo *output, ConvertPolicy policy) +{ + return NEDepthConvertLayerKernel::validate(input, output, policy, 0); +} +} // namespace arm_compute -- cgit v1.2.1