ONE - On-device Neural Engine
Loading...
Searching...
No Matches
moco::TFPack Class Referencefinal

#include <TFPack.h>

Collaboration diagram for moco::TFPack:

Public Member Functions

 TFPack (uint32_t arity)
 
Nodevalues (uint32_t index) const
 
void values (uint32_t index, Node *node)
 
uint32_t N (void) const
 
int32_t axis (void) const
 
void axis (int32_t axis)
 
- Public Member Functions inherited from moco::VariadicArityNode< TFNodeImpl< TFOpcode::Pack > >
 VariadicArityNode (uint32_t arity)
 
virtual ~VariadicArityNode ()=default
 
uint32_t arity (void) const final
 
loco::Nodearg (uint32_t n) const final
 
void drop (void) final
 
- Public Member Functions inherited from moco::TFNodeImpl< TFOpcode::Pack >
virtual ~TFNodeImpl ()=default
 
uint32_t opnum (void) const final
 
TFOpcode opcode (void) const final
 
- Public Member Functions inherited from moco::TFNode
virtual ~TFNode ()=default
 
const loco::Dialectdialect (void) const final
 Return "Dialect" identifier that this node belongs to.
 
template<typename T >
accept (TFNodeVisitorBase< T > *) const
 
template<typename T >
accept (TFNodeMutableVisitorBase< T > *)
 
NodeName name (void) const
 
void name (const NodeName &name)
 
- Public Member Functions inherited from loco::Node
 Node ()=default
 
 Node (const Node &)=delete
 
 Node (Node &&)=delete
 
virtual ~Node ()
 
Graphgraph (void)
 
const Graphgraph (void) const
 
- 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.
 

Additional Inherited Members

- Protected Member Functions inherited from moco::VariadicArityNode< TFNodeImpl< TFOpcode::Pack > >
loco::Useat (uint32_t n) const
 

Detailed Description

Note
TFPack corresponds to the following GraphDef

Definition at line 53 of file TFPack.h.

Constructor & Destructor Documentation

◆ TFPack()

moco::TFPack::TFPack ( uint32_t  arity)
inline

Definition at line 56 of file TFPack.h.

56 : VariadicArityNode<TFNodeImpl<TFOpcode::Pack>>(arity)
57 {
58 // at least one item should exist
59 assert(arity >= 1);
60 }
uint32_t arity(void) const final
Return the number of arguments.

References moco::VariadicArityNode< TFNodeImpl< TFOpcode::Pack > >::arity().

Member Function Documentation

◆ axis() [1/2]

void moco::TFPack::axis ( int32_t  axis)
inline

Definition at line 78 of file TFPack.h.

78{ _axis = axis; }
int32_t axis(void) const
Definition TFPack.h:77

References axis().

Referenced by axis().

◆ axis() [2/2]

int32_t moco::TFPack::axis ( void  ) const
inline

Definition at line 77 of file TFPack.h.

77{ return _axis; }

◆ N()

uint32_t moco::TFPack::N ( void  ) const
inline

Definition at line 75 of file TFPack.h.

75{ return arity(); }

References moco::VariadicArityNode< TFNodeImpl< TFOpcode::Pack > >::arity().

◆ values() [1/2]

Node * moco::TFPack::values ( uint32_t  index) const
inline

Definition at line 63 of file TFPack.h.

64 {
65 assert(index < arity());
66 return at(index)->node();
67 }
Node * node(void) const
Definition Use.h:58
loco::GraphInputIndex index(const TFPlaceholder *node)
Definition TFNode.cpp:54

References moco::VariadicArityNode< TFNodeImpl< TFOpcode::Pack > >::arity(), moco::VariadicArityNode< TFNodeImpl< TFOpcode::Pack > >::at(), moco::index(), and loco::Use::node().

◆ values() [2/2]

void moco::TFPack::values ( uint32_t  index,
Node node 
)
inline

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