ONE - On-device Neural Engine
Loading...
Searching...
No Matches
onert::backend::cpu::ops::SpaceToDepthLayer Class Reference

#include <SpaceToDepthLayer.h>

Collaboration diagram for onert::backend::cpu::ops::SpaceToDepthLayer:

Public Member Functions

 SpaceToDepthLayer ()
 
void configure (const IPortableTensor *input, const int32_t block_size, IPortableTensor *output)
 
void run () override
 
- Public Member Functions inherited from onert::exec::IFunction
virtual ~IFunction ()=default
 
virtual void prepare ()
 

Detailed Description

Definition at line 32 of file SpaceToDepthLayer.h.

Constructor & Destructor Documentation

◆ SpaceToDepthLayer()

onert::backend::cpu::ops::SpaceToDepthLayer::SpaceToDepthLayer ( )

Definition at line 31 of file SpaceToDepthLayer.cc.

31 : _input(nullptr), _block_size(0), _output(nullptr)
32{
33 // DO NOTHING
34}

Member Function Documentation

◆ configure()

void onert::backend::cpu::ops::SpaceToDepthLayer::configure ( const IPortableTensor input,
const int32_t  block_size,
IPortableTensor output 
)

Definition at line 46 of file SpaceToDepthLayer.cc.

48{
49 _input = input;
50 _block_size = block_size;
51 _output = output;
52}

◆ run()

void onert::backend::cpu::ops::SpaceToDepthLayer::run ( )
overridevirtual

Implements onert::exec::IFunction.

Definition at line 54 of file SpaceToDepthLayer.cc.

55{
56 if (_input->data_type() == OperandType::FLOAT32)
57 {
58 spaceToDepth<float>();
59 }
60 else if (_input->data_type() == OperandType::QUANT_UINT8_ASYMM)
61 {
62 spaceToDepth<uint8_t>();
63 }
64 else
65 {
66 throw std::runtime_error{"SpaceToDepth: unsupported data type"};
67 }
68}
ir::DataType data_type() const override final

References onert::backend::IPortableTensor::data_type().

Referenced by package.infer.session::inference().


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