diff options
Diffstat (limited to 'arm_compute/runtime/CL/functions/CLCropResize.h')
-rw-r--r-- | arm_compute/runtime/CL/functions/CLCropResize.h | 54 |
1 files changed, 39 insertions, 15 deletions
diff --git a/arm_compute/runtime/CL/functions/CLCropResize.h b/arm_compute/runtime/CL/functions/CLCropResize.h index e781cfe61f..6fb055e893 100644 --- a/arm_compute/runtime/CL/functions/CLCropResize.h +++ b/arm_compute/runtime/CL/functions/CLCropResize.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2020 Arm Limited. + * Copyright (c) 2019-2021 Arm Limited. * * SPDX-License-Identifier: MIT * @@ -25,8 +25,10 @@ #define ARM_COMPUTE_CL_CROP_RESIZE_H #include "arm_compute/core/CL/ICLTensor.h" - #include "arm_compute/runtime/CL/CLTensor.h" +#include "arm_compute/runtime/CL/functions/CLCopy.h" +#include "arm_compute/runtime/CL/functions/CLCrop.h" +#include "arm_compute/runtime/CL/functions/CLFill.h" #include "arm_compute/runtime/CL/functions/CLScale.h" #include <cstdint> @@ -36,8 +38,6 @@ namespace arm_compute { // Forward Declarations class CLCompileContext; -class CLCopyKernel; -class CLCropKernel; class ITensor; class ITensorInfo; @@ -60,6 +60,14 @@ public: /** Configure kernel * + * Valid data layouts: + * - NHWC + * + * Valid data type configurations: + * |src0 |src1 |src2 |dst | + * |:--------|:--------|:------|:--------| + * |All |F32 |F32 |F32 | + * * @note Supported tensor rank: up to 4 * @note Box indices may be outside of the bounds, in which case @p extrapolation_value is used. * @note Start and end indices of boxes are inclusive. @@ -73,8 +81,13 @@ public: * @param[in] method The policy to be used when resizing image. Default is bilinear. * @param[in] extrapolation_value Value to be used for values outside of the image for cropping and resizing. Default is 0. */ - void configure(const ICLTensor *input, ICLTensor *boxes, ICLTensor *box_ind, ICLTensor *output, Coordinates2D crop_size, - InterpolationPolicy method = InterpolationPolicy::BILINEAR, float extrapolation_value = 0); + void configure(const ICLTensor *input, + ICLTensor *boxes, + ICLTensor *box_ind, + ICLTensor *output, + Coordinates2D crop_size, + InterpolationPolicy method = InterpolationPolicy::BILINEAR, + float extrapolation_value = 0); /** Configure kernel * * @note Supported tensor rank: up to 4 @@ -91,8 +104,14 @@ public: * @param[in] method The policy to be used when resizing image. Default is bilinear. * @param[in] extrapolation_value Value to be used for values outside of the image for cropping and resizing. Default is 0. */ - void configure(const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *boxes, ICLTensor *box_ind, ICLTensor *output, Coordinates2D crop_size, - InterpolationPolicy method = InterpolationPolicy::BILINEAR, float extrapolation_value = 0); + void configure(const CLCompileContext &compile_context, + const ICLTensor *input, + ICLTensor *boxes, + ICLTensor *box_ind, + ICLTensor *output, + Coordinates2D crop_size, + InterpolationPolicy method = InterpolationPolicy::BILINEAR, + float extrapolation_value = 0); /** Static function to check if given info will lead to a valid configuration of @ref NESlice * @@ -112,8 +131,13 @@ public: * * @return A status */ - static Status validate(const ITensorInfo *input, ITensorInfo *boxes, ITensorInfo *box_ind, const ITensorInfo *output, - Coordinates2D crop_size, InterpolationPolicy method, float extrapolation_value); + static Status validate(const ITensorInfo *input, + ITensorInfo *boxes, + ITensorInfo *box_ind, + const ITensorInfo *output, + Coordinates2D crop_size, + InterpolationPolicy method, + float extrapolation_value); void run() override; @@ -125,12 +149,12 @@ public: InterpolationPolicy _method; float _extrapolation_value; - std::vector<std::unique_ptr<CLScale>> _scale; - std::vector<std::unique_ptr<CLCopyKernel>> _copy; - std::vector<std::unique_ptr<CLTensor>> _crop_results; - std::vector<std::unique_ptr<CLTensor>> _scaled_results; + std::vector<std::unique_ptr<CLScale>> _scale; + std::vector<std::unique_ptr<CLCopy>> _copy; + std::vector<std::unique_ptr<CLTensor>> _crop_results; + std::vector<std::unique_ptr<CLTensor>> _scaled_results; - std::vector<std::unique_ptr<ICLKernel>> _internal_kernels; + std::vector<std::unique_ptr<IFunction>> _internal_functions; }; } // namespace arm_compute #endif /* ARM_COMPUTE_CL_CROP_RESIZE_H */ |