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

Gather operation as defined by ONNX spec. https://github.com/onnx/onnx/blob/master/docs/Operators.md#Gather https://www.tensorflow.org/api_docs/python/tf/gather. More...

#include <GatherOp.h>

Collaboration diagram for mir::ops::GatherOp:

Public Member Functions

 GatherOp (Output *data, Output *indices, int32_t axis)
 
OperationcopyWithInputs (const std::vector< Output * > &inputs) override
 
int32_t getAxis () 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

Constructor & Destructor Documentation

◆ GatherOp()

mir::ops::GatherOp::GatherOp ( Output data,
Output indices,
int32_t  axis 
)
inline

Definition at line 35 of file GatherOp.h.

36 : Operation(Type::gather, {data, indices}), _axis(axis)
37 {
38 inferOutputTypes();
39 }

Member Function Documentation

◆ copyWithInputs()

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

Implements mir::Operation.

Definition at line 41 of file GatherOp.h.

42 {
43 return new GatherOp(inputs[0], inputs[1], _axis);
44 }
GatherOp(Output *data, Output *indices, int32_t axis)
Definition GatherOp.h:35

◆ getAxis()

int32_t mir::ops::GatherOp::getAxis ( ) const
inline

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