Compute Library
 19.08
CLFlattenLayer Class Reference

Basic function to execute flatten. More...

#include <CLFlattenLayer.h>

Collaboration diagram for CLFlattenLayer:
[legend]

Public Member Functions

void configure (const ICLTensor *input, ICLTensor *output)
 Initialise the kernel's input and output. 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 *output)
 Static function to check if given info will lead to a valid configuration of CLFlattenLayer. More...
 

Detailed Description

Basic function to execute flatten.

This function calls the following OpenCL kernel:

  1. CLFlattenLayerKernel

Definition at line 39 of file CLFlattenLayer.h.

Member Function Documentation

◆ configure()

void configure ( const ICLTensor input,
ICLTensor output 
)

Initialise the kernel's input and output.

Parameters
[in]inputFirst input tensor to flatten with at least 3 dimensions. The dimensions above the third will be interpreted as batches. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32
[out]outputOutput tensor with shape [w*h*d, input_batches] where: w = width input tensor, h = height input tensor and d = depth input tensor. Data type supported: same as input

Definition at line 32 of file CLFlattenLayer.cpp.

33 {
34  auto k = arm_compute::support::cpp14::make_unique<CLFlattenLayerKernel>();
35  k->configure(input, output);
36  _kernel = std::move(k);
38 }
static CLScheduler & get()
Access the scheduler singleton.
Definition: CLScheduler.cpp:41
void tune_kernel_static(ICLKernel &kernel)
Tunes OpenCL kernel.
Definition: CLScheduler.h:172

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

◆ validate()

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

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

Parameters
[in]inputFirst input tensor to flatten with at least 3 dimensions. The dimensions above the third will be interpreted as batches. Data types supported: U8/S8/QASYMM8/U16/S16/F16/U32/S32/F32
[out]outputOutput tensor with shape [w*h*d, input_batches] where: w = width input tensor, h = height input tensor and d = depth input tensor. Data type supported: same as input
Returns
a status

Definition at line 40 of file CLFlattenLayer.cpp.

41 {
42  return CLFlattenLayerKernel::validate(input, output);
43 }
static Status validate(const ITensorInfo *input, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of CLFlattenLayerKernel.

References CLFlattenLayerKernel::validate().

Referenced by CLFullyConnectedLayer::validate().


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