ONE - On-device Neural Engine
Loading...
Searching...
No Matches
mir::ops::PadOp Class Reference

#include <PadOp.h>

Collaboration diagram for mir::ops::PadOp:

Public Member Functions

 PadOp (Output *arg, const PadOpAttributes &attributes)
 
OperationcopyWithInputs (const std::vector< Output * > &inputs) override
 
const std::vector< std::int32_t > & getPaddingBefore () const
 
const std::vector< std::int32_t > & getPaddingAfter () const
 
float getPaddingValue () const
 
- Public Member Functions inherited from mir::Operation
virtual ~Operation ()=default
 
Type getType () const
 
std::size_t getId () const
 
void setId (std::size_t id)
 
std::size_t getNumInputs () const
 
std::size_t getNumOutputs () const
 
std::deque< Output * > & getInputs ()
 
const std::deque< Output * > & getInputs () const
 
std::deque< Output > & getOutputs ()
 
const std::deque< Output > & getOutputs () const
 
OutputgetInput (std::size_t index)
 
const OutputgetInput (std::size_t index) const
 
OutputgetOutput (std::size_t index)
 
const OutputgetOutput (std::size_t index) const
 
const ShapegetInputShape (std::size_t index) const
 
const ShapegetOutputShape (std::size_t index) const
 
void accept (IVisitor *v)
 

Additional Inherited Members

- Public Types inherited from mir::Operation
enum class  Type { HANDLE_OP }
 
- Protected Member Functions inherited from mir::Operation
 Operation (Type type, const std::vector< Output * > &inputs, std::size_t num_outputs=1)
 
void setOutputType (std::size_t index, const TensorType &type)
 

Detailed Description

Definition at line 28 of file PadOp.h.

Constructor & Destructor Documentation

◆ PadOp()

mir::ops::PadOp::PadOp ( Output arg,
const PadOpAttributes attributes 
)
inline

Definition at line 31 of file PadOp.h.

32 : Operation(Type::pad, {arg}), _attributes(attributes)
33 {
34 assert(_attributes.padding_before.size() == _attributes.padding_after.size());
35 inferOutputTypes();
36 }
std::vector< std::int32_t > padding_after
Definition Attributes.h:78
std::vector< std::int32_t > padding_before
Definition Attributes.h:77

Member Function Documentation

◆ copyWithInputs()

Operation * mir::ops::PadOp::copyWithInputs ( const std::vector< Output * > &  inputs)
inlineoverridevirtual

Implements mir::Operation.

Definition at line 38 of file PadOp.h.

39 {
40 return new PadOp(inputs[0], _attributes);
41 }
PadOp(Output *arg, const PadOpAttributes &attributes)
Definition PadOp.h:31

◆ getPaddingAfter()

const std::vector< std::int32_t > & mir::ops::PadOp::getPaddingAfter ( ) const
inline

◆ getPaddingBefore()

const std::vector< std::int32_t > & mir::ops::PadOp::getPaddingBefore ( ) const
inline

◆ getPaddingValue()

float mir::ops::PadOp::getPaddingValue ( ) const
inline

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