Compute Library
 21.02
NEBatchToSpaceLayer Class Reference

Basic function to run NEBatchToSpaceLayerKernel. More...

#include <NEBatchToSpaceLayer.h>

Collaboration diagram for NEBatchToSpaceLayer:
[legend]

Public Member Functions

 NEBatchToSpaceLayer ()=default
 Constructor. More...
 
 NEBatchToSpaceLayer (const NEBatchToSpaceLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
NEBatchToSpaceLayeroperator= (const NEBatchToSpaceLayer &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 NEBatchToSpaceLayer (NEBatchToSpaceLayer &&)=delete
 Prevent instances of this class from being moved (As this class contains non movable objects) More...
 
NEBatchToSpaceLayeroperator= (NEBatchToSpaceLayer &&)=delete
 Prevent instances of this class from being moved (As this class contains non movable objects) More...
 
 ~NEBatchToSpaceLayer ()=default
 Default destructor. More...
 
void configure (const ITensor *input, const ITensor *block_shape, ITensor *output)
 Set the input and output tensors. More...
 
void configure (const ITensor *input, int32_t block_shape_x, int32_t block_shape_y, ITensor *output)
 Set the input and output tensors. More...
 
- Public Member Functions inherited from INESimpleFunctionNoBorder
 INESimpleFunctionNoBorder (IRuntimeContext *ctx=nullptr)
 Constructor. More...
 
 INESimpleFunctionNoBorder (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
 INESimpleFunctionNoBorder (INESimpleFunctionNoBorder &&)=default
 Default move constructor. More...
 
INESimpleFunctionNoBorderoperator= (const INESimpleFunctionNoBorder &)=delete
 Prevent instances of this class from being copied (As this class contains pointers) More...
 
INESimpleFunctionNoBorderoperator= (INESimpleFunctionNoBorder &&)=default
 Default move assignment operator. More...
 
 ~INESimpleFunctionNoBorder ()
 Default destructor. 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 *block_shape, const ITensorInfo *output)
 Static function to check if given info will lead to a valid configuration of CLBatchToSpaceLayer. More...
 
static Status validate (const ITensorInfo *input, int32_t block_shape_x, int32_t block_shape_y, const ITensorInfo *output)
 Static function to check if given info will lead to a valid configuration of CLBatchToSpaceLayer (Static block shape). More...
 

Detailed Description

Basic function to run NEBatchToSpaceLayerKernel.

Definition at line 38 of file NEBatchToSpaceLayer.h.

Constructor & Destructor Documentation

◆ NEBatchToSpaceLayer() [1/3]

NEBatchToSpaceLayer ( )
default

Constructor.

◆ NEBatchToSpaceLayer() [2/3]

Prevent instances of this class from being copied (As this class contains pointers)

◆ NEBatchToSpaceLayer() [3/3]

Prevent instances of this class from being moved (As this class contains non movable objects)

◆ ~NEBatchToSpaceLayer()

~NEBatchToSpaceLayer ( )
default

Default destructor.

Member Function Documentation

◆ configure() [1/2]

void configure ( const ITensor input,
const ITensor block_shape,
ITensor output 
)

Set the input and output tensors.

Parameters
[in]inputTensor input. Supported tensor rank: 4. Data types supported: All.
[in]block_shape1-D tensor with shape [M]. Data types supported: S32
[out]outputTensor output. Data types supported: same as input

Definition at line 35 of file NEBatchToSpaceLayer.cpp.

36 {
37  auto k = std::make_unique<NEBatchToSpaceLayerKernel>();
38  k->configure(input, block_shape, output);
39  _kernel = std::move(k);
40 }

◆ configure() [2/2]

void configure ( const ITensor input,
int32_t  block_shape_x,
int32_t  block_shape_y,
ITensor output 
)

Set the input and output tensors.

(Static block shape).

Parameters
[in]inputTensor input. Supported tensor rank: 4. Data types supported: All.
[in]block_shape_xBlock shape x value.
[in]block_shape_yBlock shape y value.
[out]outputTensor output. Data types supported: same as input

Definition at line 42 of file NEBatchToSpaceLayer.cpp.

43 {
44  auto k = std::make_unique<NEBatchToSpaceLayerKernel>();
45  k->configure(input, block_shape_x, block_shape_y, output);
46  _kernel = std::move(k);
47 }

◆ operator=() [1/2]

NEBatchToSpaceLayer& operator= ( const NEBatchToSpaceLayer )
delete

Prevent instances of this class from being copied (As this class contains pointers)

◆ operator=() [2/2]

NEBatchToSpaceLayer& operator= ( NEBatchToSpaceLayer &&  )
delete

Prevent instances of this class from being moved (As this class contains non movable objects)

◆ validate() [1/2]

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

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

Parameters
[in]inputTensor input info. Supported tensor rank: 4. Data types supported: All.
[in]block_shapeblock shape tensor info with shape [M]. Data types supported: S32
[out]outputTensor output info. Data types supported: same as input
Returns
a status

Definition at line 49 of file NEBatchToSpaceLayer.cpp.

References NEBatchToSpaceLayerKernel::validate().

Referenced by arm_compute::test::validation::DATA_TEST_CASE().

50 {
51  return NEBatchToSpaceLayerKernel::validate(input, block_shape, output);
52 }
static Status validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of NEBatchToSpaceLayerKerne...

◆ validate() [2/2]

Status validate ( const ITensorInfo input,
int32_t  block_shape_x,
int32_t  block_shape_y,
const ITensorInfo output 
)
static

Static function to check if given info will lead to a valid configuration of CLBatchToSpaceLayer (Static block shape).

Parameters
[in]inputTensor input info. Supported tensor rank: 4. Data types supported: All.
[in]block_shape_xBlock shape x value.
[in]block_shape_yBlock shape y value.
[out]outputTensor output info. Data types supported: same as input
Returns
a status

Definition at line 54 of file NEBatchToSpaceLayer.cpp.

References NEBatchToSpaceLayerKernel::validate().

55 {
56  return NEBatchToSpaceLayerKernel::validate(input, block_shape_x, block_shape_y, output);
57 }
static Status validate(const ITensorInfo *input, const ITensorInfo *block_shape, const ITensorInfo *output)
Static function to check if given info will lead to a valid configuration of NEBatchToSpaceLayerKerne...

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