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

#include <UnpackLayer.h>

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

Public Member Functions

 UnpackLayer ()
 
void configure (const IPortableTensor *input, uint32_t axis, int32_t num_output, std::vector< IPortableTensor * > &output)
 
void run () override
 
- Public Member Functions inherited from onert::exec::IFunction
virtual ~IFunction ()=default
 
virtual void prepare ()
 

Detailed Description

Definition at line 33 of file UnpackLayer.h.

Constructor & Destructor Documentation

◆ UnpackLayer()

onert::backend::cpu::ops::UnpackLayer::UnpackLayer ( )

Definition at line 32 of file UnpackLayer.cc.

32 : _input(nullptr), _outputs(), _axis(0), _num_output(0)
33{
34 // DO NOTHING
35}

Member Function Documentation

◆ configure()

void onert::backend::cpu::ops::UnpackLayer::configure ( const IPortableTensor input,
uint32_t  axis,
int32_t  num_output,
std::vector< IPortableTensor * > &  output 
)

Definition at line 65 of file UnpackLayer.cc.

67{
68 assert(input != nullptr);
69 assert(outputs.size() > 0);
70 assert(outputs.size() == (size_t)num);
71
72 _input = input;
73 _axis = axis;
74 _num_output = num;
75 _outputs = outputs;
76}

◆ run()

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

Implements onert::exec::IFunction.

Definition at line 78 of file UnpackLayer.cc.

79{
80 if (_input->data_type() == OperandType::FLOAT32)
81 unpackImpl<float>();
82 else if (_input->data_type() == OperandType::INT32)
83 unpackImpl<int32_t>();
84 else
85 throw std::runtime_error{"Unpack: Unsupported data type"};
86}
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: