Compute Library
 19.08
CLGather Class Reference

Basic function to run CLGatherKernel. More...

#include <CLGather.h>

Collaboration diagram for CLGather:
[legend]

Public Member Functions

void configure (const ICLTensor *input, const ICLTensor *indices, ICLTensor *output, int axis=0)
 Initialise the kernel's inputs and outputs. More...
 
- Public Member Functions inherited from ICLSimpleFunction
 ICLSimpleFunction ()
 Default constructor. More...
 
void run () override final
 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 *indices, const ITensorInfo *output, int axis=0)
 Static function to check if given info will lead to a valid configuration of CLGatherKernel. More...
 

Detailed Description

Basic function to run CLGatherKernel.

Definition at line 35 of file CLGather.h.

Member Function Documentation

◆ configure()

void configure ( const ICLTensor input,
const ICLTensor indices,
ICLTensor output,
int  axis = 0 
)

Initialise the kernel's inputs and outputs.

Parameters
[in]inputSource tensor. Supported tensor rank: up to 4. Data type supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32
[in]indicesIndices tensor. Supported tensor rank: up to 1. Must be one of the following types: U32/S32. Each value must be in range [0, input.shape[axis])
[out]outputDestination tensor. Data type supported: Same as input
[in]axis(Optional) The axis in input to gather indices from. Defaults to 0

Definition at line 32 of file CLGather.cpp.

33 {
34  auto k = arm_compute::support::cpp14::make_unique<CLGatherKernel>();
35  k->configure(input, indices, output, axis);
36  _kernel = std::move(k);
37 }

References arm_compute::test::validation::axis.

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo indices,
const ITensorInfo output,
int  axis = 0 
)
static

Static function to check if given info will lead to a valid configuration of CLGatherKernel.

Parameters
[in]inputSource tensor info. Supported tensor rank: up to 4. Data type supported: U8/S8/QASYMM8/U16/S16/U32/S32/F16/F32
[in]indicesIndices tensor info. Supported tensor rank: up to 4. Must be one of the following types: U32/S32. Each value must be in range [0, input.shape[axis])
[in]outputDestination tensor info. Data type supported: Same as input
[in]axis(Optional) The axis in input to gather indices from. Defaults to 0
Returns
a status

Definition at line 39 of file CLGather.cpp.

40 {
41  return CLGatherKernel::validate(input, indices, output, axis);
42 }
static Status validate(const ITensorInfo *input, const ITensorInfo *indices, const ITensorInfo *output, int axis=0)
Static function to check if given info will lead to a valid configuration of CLGatherKernel.

References arm_compute::test::validation::axis, and CLGatherKernel::validate().


The documentation for this class was generated from the following files: