21.02
|
Kernel to perform other operation on Neon. More...
#include <NEGatherKernel.h>
Public Member Functions | |
NEGatherKernel () | |
Default constructor. More... | |
NEGatherKernel (const NEGatherKernel &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers). More... | |
NEGatherKernel & | operator= (const NEGatherKernel &)=delete |
Prevent instances of this class from being copied (As this class contains pointers). More... | |
NEGatherKernel (NEGatherKernel &&)=default | |
Allow instances of this class to be moved. More... | |
NEGatherKernel & | operator= (NEGatherKernel &&)=default |
Allow instances of this class to be moved. More... | |
~NEGatherKernel ()=default | |
Default detructor. More... | |
const char * | name () const override |
Name of the kernel. More... | |
void | configure (const ITensor *input, const ITensor *indices, ITensor *output, int axis=0) |
Initialise the kernel's inputs and outputs. More... | |
void | run (const Window &window, const ThreadInfo &info) override |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from ICPPKernel | |
virtual | ~ICPPKernel ()=default |
Default destructor. More... | |
virtual void | run_nd (const Window &window, const ThreadInfo &info, const Window &thread_locator) |
legacy compatibility layer for implemantions which do not support thread_locator In these cases we simply narrow the interface down the legacy version More... | |
virtual void | run_op (ITensorPack &tensors, const Window &window, const ThreadInfo &info) |
Execute the kernel on the passed window. More... | |
Public Member Functions inherited from IKernel | |
IKernel () | |
Constructor. More... | |
virtual | ~IKernel ()=default |
Destructor. More... | |
virtual bool | is_parallelisable () const |
Indicates whether or not the kernel is parallelisable. More... | |
virtual BorderSize | border_size () const |
The size of the border for that kernel. More... | |
const Window & | window () const |
The maximum window the kernel can be executed on. More... | |
Static Public Member Functions | |
static Status | validate (const ITensorInfo *input, const ITensorInfo *indices, const ITensorInfo *output, int axis) |
Static function to check if given info will lead to a valid configuration of NEGatherKernel. More... | |
Kernel to perform other operation on Neon.
Definition at line 37 of file NEGatherKernel.h.
NEGatherKernel | ( | ) |
Default constructor.
Definition at line 85 of file NEGatherKernel.cpp.
References ARM_COMPUTE_UNUSED, ITensorInfo::dimension(), Window::DimX, ITensorInfo::element_size(), arm_compute::execute_window_loop(), ITensor::info(), arm_compute::test::validation::info, Iterator::ptr(), ITensor::ptr_to_element(), Dimensions< T >::set(), Window::set(), arm_compute::U, and IKernel::window().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers).
|
default |
Allow instances of this class to be moved.
|
default |
Default detructor.
Initialise the kernel's inputs and outputs.
[in] | input | Source tensor. Supported tensor rank: up to 4. Data type supported: All |
[in] | indices | Indices tensor. Supported tensor rank: up to 1. Must be one of the following type: U32/S32. Each value Must be in range [0, input.shape[axis ]) |
[out] | output | Destination tensor. Data type supported: Same as input |
[in] | axis | (Optional) The axis in input to gather indices from. Negative values wrap around. Defaults to 0 |
Definition at line 135 of file NEGatherKernel.cpp.
References ARM_COMPUTE_ERROR, ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_NULLPTR, ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), arm_compute::calculate_max_window(), ICloneable< T >::clone(), arm_compute::misc::shape_calculator::compute_gather_shape(), ITensorInfo::data_type(), ITensor::info(), arm_compute::test::validation::input, ITensorInfo::num_dimensions(), arm_compute::S32, ITensorInfo::set_valid_region(), ITensorInfo::tensor_shape(), arm_compute::U32, and arm_compute::validate_arguments().
Referenced by NEGatherKernel::name().
|
inlineoverridevirtual |
Name of the kernel.
Implements ICPPKernel.
Definition at line 57 of file NEGatherKernel.h.
References NEGatherKernel::configure(), arm_compute::test::validation::info, arm_compute::test::validation::input, NEGatherKernel::run(), NEGatherKernel::validate(), and IKernel::window().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers).
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Execute the kernel on the passed window.
[in] | window | Region on which to execute the kernel. (Must be a region of the window returned by window()) |
[in] | info | Info about executing thread and CPU. |
Reimplemented from ICPPKernel.
Definition at line 198 of file NEGatherKernel.cpp.
References ARM_COMPUTE_ERROR_ON, ARM_COMPUTE_ERROR_ON_UNCONFIGURED_KERNEL, and ARM_COMPUTE_UNUSED.
Referenced by NEGatherKernel::name().
|
static |
Static function to check if given info will lead to a valid configuration of NEGatherKernel.
[in] | input | Source tensor info. Supported tensor rank: up to 4. Data type supported: All |
[in] | indices | Indices tensor info. Supported tensor rank: up to 1. Must be one of the following type: U32/S32. Each value Must be in range [0, input.shape[axis ]) |
[in] | output | Destination tensor info. Data type supported: Same as input |
[in] | axis | (Optional) The axis in input to gather indices from. Negative values wrap around. Defaults to 0 |
Definition at line 192 of file NEGatherKernel.cpp.
References ARM_COMPUTE_RETURN_ON_ERROR, and arm_compute::validate_arguments().
Referenced by NEGatherKernel::name(), and NEGather::validate().