Compute Library
 19.08
CLArgMinMaxLayer Class Reference

Function to calculate the index of the minimum or maximum values in a tensor based on an axis. More...

#include <CLArgMinMaxLayer.h>

Collaboration diagram for CLArgMinMaxLayer:
[legend]

Public Member Functions

void configure (const ICLTensor *input, int axis, ICLTensor *output, const ReductionOperation &op)
 Set the input and output tensors. 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, int axis, const ITensorInfo *output, const ReductionOperation &op)
 Static function to check if given info will lead to a valid configuration of CLArgMinMaxLayer. More...
 

Detailed Description

Function to calculate the index of the minimum or maximum values in a tensor based on an axis.

Definition at line 36 of file CLArgMinMaxLayer.h.

Member Function Documentation

◆ configure()

void configure ( const ICLTensor input,
int  axis,
ICLTensor output,
const ReductionOperation op 
)

Set the input and output tensors.

Parameters
[in]inputInput source tensor. Data types supported: F16/F32.
[in]axisAxis to find max/min index.
[out]outputOutput source tensor. Data types supported: U32.
[in]opOperation to perform: min or max

Definition at line 36 of file CLArgMinMaxLayer.cpp.

37 {
38  auto k = arm_compute::support::cpp14::make_unique<CLReductionOperationKernel>();
39  k->configure(input, output, axis, op);
40  _kernel = std::move(k);
41 }

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

◆ validate()

Status validate ( const ITensorInfo input,
int  axis,
const ITensorInfo output,
const ReductionOperation op 
)
static

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

Parameters
[in]inputInput source tensor info. Data types supported: F16/F32.
[in]axisAxis to find max/min index.
[in]outputOutput source tensor info. Data types supported: U32.
[in]opOperation to perform: min or max
Returns
a status

Definition at line 43 of file CLArgMinMaxLayer.cpp.

44 {
46  return CLReductionOperationKernel::validate(input, output, axis, op);
47 }
#define ARM_COMPUTE_RETURN_ERROR_ON_MSG(cond,...)
If the condition is true, an error is returned.
Definition: Error.h:214
static Status validate(const ITensorInfo *input, const ITensorInfo *output, unsigned int axis, ReductionOperation op, unsigned int width=0)
Static function to check if given info will lead to a valid configuration of CLReductionOperationKern...

References arm_compute::ARG_IDX_MAX, arm_compute::ARG_IDX_MIN, ARM_COMPUTE_RETURN_ERROR_ON_MSG, arm_compute::test::validation::axis, and CLReductionOperationKernel::validate().


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