21.02
|
Basic function to perform reduce operation. More...
#include <CLReduceMean.h>
Public Member Functions | |
CLReduceMean (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default constructor. More... | |
void | configure (ICLTensor *input, const Coordinates &reduction_axis, bool keep_dims, ICLTensor *output) |
Configure kernel. More... | |
void | configure (const CLCompileContext &compile_context, ICLTensor *input, const Coordinates &reduction_axis, bool keep_dims, ICLTensor *output) |
Configure kernel. 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 Coordinates &reduction_axis, bool keep_dims, const ITensorInfo *output) |
Static function to check if given info will lead to a valid configuration of CLReduceMean. More... | |
Basic function to perform reduce operation.
Definition at line 41 of file CLReduceMean.h.
CLReduceMean | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default constructor.
Definition at line 101 of file CLReduceMean.cpp.
void configure | ( | ICLTensor * | input, |
const Coordinates & | reduction_axis, | ||
bool | keep_dims, | ||
ICLTensor * | output | ||
) |
Configure kernel.
[in] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 |
[in] | reduction_axis | Reduction axis vector. |
[in] | keep_dims | If positive, retains reduced dimensions with length 1. |
[out] | output | Destination tensor. Data type supported: Same as input |
Definition at line 107 of file CLReduceMean.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLTensor * | input, | ||
const Coordinates & | reduction_axis, | ||
bool | keep_dims, | ||
ICLTensor * | output | ||
) |
Configure kernel.
[in] | compile_context | The compile context to be used. |
[in] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 |
[in] | reduction_axis | Reduction axis vector. |
[in] | keep_dims | If positive, retains reduced dimensions with length 1. |
[out] | output | Destination tensor. Data type supported: Same as input |
Definition at line 112 of file CLReduceMean.cpp.
References CLTensorAllocator::allocate(), CLTensor::allocator(), ARM_COMPUTE_ERROR_THROW_ON, arm_compute::auto_init_if_empty(), Dimensions< T >::begin(), arm_compute::misc::shape_calculator::calculate_reduce_mean_shape(), ICloneable< T >::clone(), CLDequantizationLayer::configure(), CLQuantizationLayer::configure(), CLReshapeLayer::configure(), arm_compute::convert_negative_axis(), ITensorInfo::data_type(), arm_compute::F32, ITensor::info(), CLTensor::info(), arm_compute::test::validation::info, arm_compute::test::validation::input, arm_compute::is_data_type_quantized(), MemoryGroup::manage(), arm_compute::MEAN_SUM, ITensorInfo::num_channels(), Dimensions< T >::num_dimensions(), ITensorInfo::num_dimensions(), arm_compute::test::validation::output_shape, ITensorInfo::quantization_info(), TensorShape::remove_dimension(), TensorShape::set(), TensorInfo::set_data_type(), ITensorInfo::tensor_shape(), and CLReduceMean::validate().
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 199 of file CLReduceMean.cpp.
References ICLSimpleFunction::run(), and CLReshapeLayer::run().
|
static |
Static function to check if given info will lead to a valid configuration of CLReduceMean.
[in] | input | Source tensor. Data type supported: QASYMM8/QASYMM8_SIGNED/F16/F32 |
[in] | reduction_axis | Reduction axis vector. |
[in] | keep_dims | If positive, retains reduced dimensions with length 1. |
[in] | output | Destination tensor. Data type supported: Same as input |
Definition at line 194 of file CLReduceMean.cpp.
Referenced by CLReduceMean::configure(), and arm_compute::test::validation::DATA_TEST_CASE().