21.02
|
Basic function to execute mean and standard deviation by calling CLMeanStdDevKernel. More...
#include <CLMeanStdDev.h>
Public Member Functions | |
CLMeanStdDev (std::shared_ptr< IMemoryManager > memory_manager=nullptr) | |
Default Constructor. More... | |
CLMeanStdDev (const CLMeanStdDev &)=delete | |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLMeanStdDev & | operator= (const CLMeanStdDev &)=delete |
Prevent instances of this class from being copied (As this class contains pointers) More... | |
CLMeanStdDev (CLMeanStdDev &&)=default | |
Allow instances of this class to be moved. More... | |
CLMeanStdDev & | operator= (CLMeanStdDev &&)=default |
Allow instances of this class to be moved. More... | |
~CLMeanStdDev () | |
Default destructor. More... | |
void | configure (ICLImage *input, float *mean, float *stddev=nullptr) |
Initialise the kernel's inputs and outputs. More... | |
void | configure (const CLCompileContext &compile_context, ICLImage *input, float *mean, float *stddev=nullptr) |
Initialise the kernel's inputs and outputs. 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 (ITensorInfo *input, float *mean, float *stddev=nullptr) |
Static function to check if given info will lead to a valid configuration of CLMeanStdDev. More... | |
Basic function to execute mean and standard deviation by calling CLMeanStdDevKernel.
Definition at line 43 of file CLMeanStdDev.h.
CLMeanStdDev | ( | std::shared_ptr< IMemoryManager > | memory_manager = nullptr | ) |
Default Constructor.
Definition at line 34 of file CLMeanStdDev.cpp.
References CLMeanStdDev::~CLMeanStdDev().
|
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 destructor.
Referenced by CLMeanStdDev::CLMeanStdDev().
void configure | ( | ICLImage * | input, |
float * | mean, | ||
float * | stddev = nullptr |
||
) |
Initialise the kernel's inputs and outputs.
[in,out] | input | Input image. Data types supported: U8/F16/F32. (Written to only for border filling) |
[out] | mean | Output average pixel value. |
[out] | stddev | (Optional) Output standard deviation of pixel values. |
Definition at line 72 of file CLMeanStdDev.cpp.
References CLKernelLibrary::get().
void configure | ( | const CLCompileContext & | compile_context, |
ICLImage * | input, | ||
float * | mean, | ||
float * | stddev = nullptr |
||
) |
Initialise the kernel's inputs and outputs.
[in] | compile_context | The compile context to be used. |
[in,out] | input | Input image. Data types supported: U8/F16/F32. (Written to only for border filling) |
[out] | mean | Output average pixel value. |
[out] | stddev | (Optional) Output standard deviation of pixel values. |
Definition at line 77 of file CLMeanStdDev.cpp.
References CLTensorAllocator::allocate(), CLTensor::allocator(), ICLTensor::buffer(), CLReductionOperation::configure(), arm_compute::CONSTANT, ITensorInfo::data_type(), ITensorInfo::dimension(), TensorInfo::dimension(), CLScheduler::enqueue(), CLScheduler::get(), ITensor::info(), CLTensor::info(), arm_compute::is_data_type_float(), MemoryGroup::manage(), CLTensor::map(), TensorInfo::offset_element_in_bytes(), CLReductionOperation::run(), arm_compute::SUM, arm_compute::SUM_SQUARE, and CLTensor::unmap().
|
delete |
Prevent instances of this class from being copied (As this class contains pointers)
|
default |
Allow instances of this class to be moved.
|
overridevirtual |
Run the kernels contained in the function.
For Neon kernels:
For OpenCL kernels:
Implements IFunction.
Definition at line 161 of file CLMeanStdDev.cpp.
References ARM_COMPUTE_ERROR_ON, arm_compute::F16, arm_compute::F32, and arm_compute::U8.
|
static |
Static function to check if given info will lead to a valid configuration of CLMeanStdDev.
[in] | input | Input image. Data types supported: U8/F16/F32. |
[in] | mean | Output average pixel value. |
[in] | stddev | (Optional) Output standard deviation of pixel values. |
Definition at line 54 of file CLMeanStdDev.cpp.
References ARM_COMPUTE_RETURN_ERROR_ON_TENSOR_NOT_2D, ARM_COMPUTE_UNUSED, ITensorInfo::data_type(), ITensorInfo::dimension(), arm_compute::is_data_type_float(), arm_compute::test::validation::output_shape, arm_compute::SUM, arm_compute::U8, CLMeanStdDevKernel::validate(), and CLReductionOperation::validate().
Referenced by arm_compute::test::validation::DATA_TEST_CASE().