21.05
|
Basic function to run opencl::kernels::ClCropKernel. More...
#include <CLCrop.h>
Public Member Functions | |
CLCrop () | |
Constructor. More... | |
~CLCrop () | |
Destructor. More... | |
CLCrop (const CLCrop &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLCrop (CLCrop &&) | |
Default move constructor. More... | |
CLCrop & | operator= (const CLCrop &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLCrop & | operator= (CLCrop &&) |
Default move assignment operator. More... | |
void | configure (const ICLTensor *input, ICLTensor *output, Coordinates2D start, Coordinates2D end, uint32_t batch_index, float extrapolation_value=0, Window *output_window=nullptr) |
Configure function. More... | |
void | configure (const CLCompileContext &compile_context, const ICLTensor *input, ICLTensor *output, Coordinates2D start, Coordinates2D end, uint32_t batch_index, float extrapolation_value=0, Window *output_window=nullptr) |
Configure function. More... | |
void | run () override |
Run the kernels contained in the function. More... | |
Public Member Functions inherited from IFunction | |
virtual | ~IFunction ()=default |
Destructor. More... | |
virtual void | prepare () |
Prepare the function for executing. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *output, Coordinates2D start, Coordinates2D end, uint32_t batch_index, float extrapolation_value=0, Window *output_window=nullptr) |
Static function to check if given info will lead to a valid configuration of CLStridedSliceKernel. More... | |
Basic function to run opencl::kernels::ClCropKernel.
CLCrop | ( | ) |
Constructor.
Definition at line 44 of file CLCrop.cpp.
|
default |
Destructor.
Prevent instances of this class from being copied (As this class contains pointers)
void configure | ( | const ICLTensor * | input, |
ICLTensor * | output, | ||
Coordinates2D | start, | ||
Coordinates2D | end, | ||
uint32_t | batch_index, | ||
float | extrapolation_value = 0 , |
||
Window * | output_window = nullptr |
||
) |
Configure function.
Valid data layouts:
Valid data type configurations:
src | dst |
---|---|
All | F32 |
[in] | input | Source tensor. Data type supported: All. Data layouts supported: NHWC. |
[out] | output | Destination tensor. Data type supported: F32 |
[in] | start | Coordinates of where to start cropping the image. |
[in] | end | Coordinates of where to end cropping the image. |
[in] | batch_index | Fourth dimension index of the 3D image to crop in input . |
[in] | extrapolation_value | Value to be used for values outside of the image. Default is 0. |
[in] | output_window | Output window to be used in case cropped image is being copied into a tensor. Default is nullptr. |
Definition at line 52 of file CLCrop.cpp.
References arm_compute::test::validation::dst, arm_compute::mlgo::parser::end(), CLKernelLibrary::get(), and arm_compute::test::validation::src.
void configure | ( | const CLCompileContext & | compile_context, |
const ICLTensor * | input, | ||
ICLTensor * | output, | ||
Coordinates2D | start, | ||
Coordinates2D | end, | ||
uint32_t | batch_index, | ||
float | extrapolation_value = 0 , |
||
Window * | output_window = nullptr |
||
) |
Configure function.
[in] | compile_context | The compile context to be used. |
[in] | input | Source tensor. Data type supported: All. Data layouts supported: NHWC. |
[out] | output | Destination tensor. Data type supported: F32 |
[in] | start | Coordinates of where to start cropping the image. |
[in] | end | Coordinates of where to end cropping the image. |
[in] | batch_index | Fourth dimension index of the 3D image to crop in input . |
[in] | extrapolation_value | Value to be used for values outside of the image. Default is 0. |
[in] | output_window | Output window to be used in case cropped image is being copied into a tensor. Default is nullptr. |
Definition at line 58 of file CLCrop.cpp.
References ARM_COMPUTE_ERROR_ON_NULLPTR, arm_compute::test::validation::dst, arm_compute::mlgo::parser::end(), and arm_compute::test::validation::src.
Prevent instances of this class from being copied (As this class contains pointers)
|
overridevirtual |
Run the kernels contained in the function.
For CPU kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 75 of file CLCrop.cpp.
References arm_compute::ACL_DST, arm_compute::ACL_SRC, and ITensorPack::add_tensor().
|
static |
Static function to check if given info will lead to a valid configuration of CLStridedSliceKernel.
[in] | input | Source tensor info. Data type supported: All. Data layouts supported: NHWC. |
[in] | output | Destination tensor info. Data type supported: F32 |
[in] | start | Coordinates of where to start cropping the image. |
[in] | end | Coordinates of where to end cropping the image. |
[in] | batch_index | Fourth dimension index of the 3D image to crop in input . |
[in] | extrapolation_value | Value to be used for values outside of the image. Default is 0. |
[in] | output_window | Output window to be used in case cropped image is being copied into a tensor. Default is nullptr. |
Definition at line 70 of file CLCrop.cpp.
References arm_compute::mlgo::parser::end(), arm_compute::test::validation::input, and ClCrop::validate().
Referenced by CLCropResize::validate().