ONE - On-device Neural Engine
Loading...
Searching...
No Matches
loco::TensorBroadcast Class Referencefinal

Duplicate elements along specified axes. More...

#include <Nodes.h>

Collaboration diagram for loco::TensorBroadcast:

Data Structures

class  Mapping
 

Public Member Functions

 TensorBroadcast ()=default
 
Nodeinput (void) const
 
void input (Node *node)
 
Mappingmapping (void)
 
const Mappingmapping (void) const
 
- Public Member Functions inherited from loco::CanonicalNodeDef< CanonicalOpcode::TensorBroadcast, FixedArity< 1 >::Mixin >
virtual ~CanonicalNodeDef ()=default
 
uint32_t opnum (void) const final
 
CanonicalOpcode opcode (void) const final
 
- Public Member Functions inherited from loco::CanonicalNode
virtual ~CanonicalNode ()=default
 
const Dialectdialect (void) const final
 Return "Dialect" identifier that this node belongs to.
 
template<typename T >
accept (CanonicalNodeVisitorBase< T > *) const
 
template<typename T >
accept (CanonicalNodeMutableVisitorBase< T > *)
 
- Public Member Functions inherited from loco::Node
 Node ()=default
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
virtual ~Node ()
 
Graphgraph (void)
 
const Graphgraph (void) const
 
virtual uint32_t arity (void) const =0
 Return the number of arguments.
 
virtual Nodearg (uint32_t N) const =0
 Access N-th argument node.
 
virtual void drop (void)=0
 Drop all the reference of arguments.
 
- Public Member Functions inherited from loco::AnnotatedItem< NodeAnnotation >
 AnnotatedItem ()=default
 
virtual ~AnnotatedItem ()=default
 
const T * annot (void) const
 Retrieve a stored annotation of type T.
 
void annot (std::unique_ptr< T > &&p)
 Attach or remove a new annotation of type T.
 

Detailed Description

Duplicate elements along specified axes.

TensorBroadcast takes a tensor and produces another tensor with the same rank but HIGHER dimensionality.

To create such a tensor. TensorBroadcast duplicates the element along the specified axes.

It is possible to control the degree of duplication with a partial map from TensorAxis to Dimension.

TODO Explain the constraints (The dimension of inputs for specified axes SHOULD BE 1). TODO Explain the operation semantics

Definition at line 978 of file Nodes.h.

Constructor & Destructor Documentation

◆ TensorBroadcast()

loco::TensorBroadcast::TensorBroadcast ( )
default

Member Function Documentation

◆ input() [1/2]

void loco::TensorBroadcast::input ( Node node)
inline

Definition at line 986 of file Nodes.h.

986{ at(0)->node(node); }

◆ input() [2/2]

Node * loco::TensorBroadcast::input ( void  ) const
inline

Definition at line 985 of file Nodes.h.

985{ return at(0)->node(); }

Referenced by TensorBroadcastLayer::operator()().

◆ mapping() [1/2]

Mapping * loco::TensorBroadcast::mapping ( void  )
inline

Definition at line 1004 of file Nodes.h.

1004{ return &_mapping; }

◆ mapping() [2/2]

const Mapping * loco::TensorBroadcast::mapping ( void  ) const
inline

Definition at line 1005 of file Nodes.h.

1005{ return &_mapping; }

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