Compute Library
 19.08
CLNormalizePlanarYUVLayer Class Reference

Basic function to run CLNormalizePlanarYUVLayerKernel. More...

#include <CLNormalizePlanarYUVLayer.h>

Collaboration diagram for CLNormalizePlanarYUVLayer:
[legend]

Public Member Functions

 CLNormalizePlanarYUVLayer ()
 Default constructor. More...
 
void configure (const ICLTensor *input, ICLTensor *output, const ICLTensor *mean, const ICLTensor *std)
 Set the input and output tensors. 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 ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *std)
 Static function to check if given info will lead to a valid configuration of CLNormalizePlanarYUVLayer. More...
 

Detailed Description

Basic function to run CLNormalizePlanarYUVLayerKernel.

Note
The function simulates a NormalizePlanarYUV layer.

Definition at line 40 of file CLNormalizePlanarYUVLayer.h.

Constructor & Destructor Documentation

◆ CLNormalizePlanarYUVLayer()

Default constructor.

Definition at line 35 of file CLNormalizePlanarYUVLayer.cpp.

36  : _norm_kernel()
37 {
38 }

Member Function Documentation

◆ configure()

void configure ( const ICLTensor input,
ICLTensor output,
const ICLTensor mean,
const ICLTensor std 
)

Set the input and output tensors.

Parameters
[in]inputSource tensor. 3 lower dimensions represent a single input with dimensions [width, height, channels]. Data types supported: QASYMM8/F16/F32.
[out]outputDestinationfeature tensor. Data type supported: same as input
[in]meanMean values tensor. 1 dimension with size equal to the number of input channels. Data types supported: Same as input
[in]stdStandard deviation values tensor. 1 dimension with size equal to the number of input channels. Data types supported: Same as input

Definition at line 40 of file CLNormalizePlanarYUVLayer.cpp.

41 {
42  _norm_kernel.configure(input, output, mean, std);
43 }
void configure(const ICLTensor *input, ICLTensor *output, const ICLTensor *mean, const ICLTensor *std)
Set the input and output tensors.

References CLNormalizePlanarYUVLayerKernel::configure().

◆ run()

void run ( )
overridevirtual

Run the kernels contained in the function.

For NEON kernels:

  • Multi-threading is used for the kernels which are parallelisable.
  • By default std::thread::hardware_concurrency() threads are used.
Note
CPPScheduler::set_num_threads() can be used to manually set the number of threads

For OpenCL kernels:

  • All the kernels are enqueued on the queue associated with CLScheduler.
  • The queue is then flushed.
Note
The function will not block until the kernels are executed. It is the user's responsibility to wait.
Will call prepare() on first run if hasn't been done

Implements IFunction.

Definition at line 51 of file CLNormalizePlanarYUVLayer.cpp.

52 {
53  CLScheduler::get().enqueue(_norm_kernel, true);
54 }
static CLScheduler & get()
Access the scheduler singleton.
Definition: CLScheduler.cpp:41
void enqueue(ICLKernel &kernel, bool flush=true)
Schedule the execution of the passed kernel if possible.
Definition: CLScheduler.cpp:95

References CLScheduler::enqueue(), and CLScheduler::get().

◆ validate()

Status validate ( const ITensorInfo input,
const ITensorInfo output,
const ITensorInfo mean,
const ITensorInfo std 
)
static

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

Parameters
[in]inputSource tensor info. 3 lower dimensions represent a single input with dimensions [width, height, channels]. Data types supported: QASYMM8/F16/F32.
[out]outputDestination tensor info. Data type supported: same as input
[in]meanMean values tensor info. 1 dimension with size equal to the number of input channels. Data types supported: Same as input
[in]stdStandard deviation values tensor info. 1 dimension with size equal to the number of input channels. Data types supported: Same as input
Returns
a status

Definition at line 45 of file CLNormalizePlanarYUVLayer.cpp.

47 {
48  return CLNormalizePlanarYUVLayerKernel::validate(input, output, mean, std);
49 }
static Status validate(const ITensorInfo *input, const ITensorInfo *output, const ITensorInfo *mean, const ITensorInfo *std)
Static function to check if given info will lead to a valid configuration of CLNormalizePlanarYUVLaye...

References CLNormalizePlanarYUVLayerKernel::validate().


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