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

#include <RankLayer.h>

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

Public Member Functions

 RankLayer ()
 
void configure (const IPortableTensor *input, 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 RankLayer.h.

Constructor & Destructor Documentation

◆ RankLayer()

onert::backend::cpu::ops::RankLayer::RankLayer ( )

Definition at line 30 of file RankLayer.cc.

30 : _input(nullptr), _output(nullptr)
31{
32 // DO NOTHING
33}

Member Function Documentation

◆ configure()

void onert::backend::cpu::ops::RankLayer::configure ( const IPortableTensor input,
IPortableTensor output 
)

Definition at line 35 of file RankLayer.cc.

◆ run()

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

Implements onert::exec::IFunction.

Definition at line 41 of file RankLayer.cc.

42{
43 int32_t *output_data = getBuffer<int32_t>(_output);
44 output_data[0] = _input->getShape().rank();
45}
ir::Shape getShape() const override final
Get ir::Shape of tensor.

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

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


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