ONE - On-device Neural Engine
Loading...
Searching...
No Matches
coco::Object Class Reference

Base interface on all typed NN values. More...

#include <Object.h>

Collaboration diagram for coco::Object:

Data Structures

struct  Consumer
 
struct  Producer
 

Public Types

enum class  Kind { Unknown , Feature , Kernel }
 
using ConsumerSet = std::set< Consumer * >
 

Public Member Functions

 Object ()
 
virtual ~Object ()=default
 
virtual Kind kind (void) const
 
coco::Bagbag (void) const
 
void bag (coco::Bag *bag)
 
virtual FeatureObjectasFeature (void)
 
virtual const FeatureObjectasFeature (void) const
 
virtual KernelObjectasKernel (void)
 
virtual const KernelObjectasKernel (void) const
 
Defdef (void) const
 
const UseSetuses (void) const
 
- Public Member Functions inherited from coco::Entity
virtual ~Entity ()=default
 
Modulemodule (void) const
 

Friends

class Def
 
class Use
 

Detailed Description

Base interface on all typed NN values.

Definition at line 37 of file Object.h.

Member Typedef Documentation

◆ ConsumerSet

using coco::Object::ConsumerSet = std::set<Consumer *>

Definition at line 62 of file Object.h.

Member Enumeration Documentation

◆ Kind

enum class coco::Object::Kind
strong
Enumerator
Unknown 
Feature 
Kernel 

Definition at line 44 of file Object.h.

Constructor & Destructor Documentation

◆ Object()

coco::Object::Object ( )

Definition at line 27 of file Object.cpp.

28{
29 // Register self to Dep
30 _dep.object(this);
31}
Object * object(void) const
Definition Dep.h:49

References coco::Dep::object().

◆ ~Object()

virtual coco::Object::~Object ( )
virtualdefault

Member Function Documentation

◆ asFeature() [1/2]

virtual FeatureObject * coco::Object::asFeature ( void  )
inlinevirtual

Reimplemented in coco::FeatureObject.

Definition at line 78 of file Object.h.

78{ return nullptr; }

Referenced by coco::cast(), dump(), coco::isa< FeatureObject >(), and coco::safe_cast().

◆ asFeature() [2/2]

virtual const FeatureObject * coco::Object::asFeature ( void  ) const
inlinevirtual

Reimplemented in coco::FeatureObject.

Definition at line 79 of file Object.h.

79{ return nullptr; }

◆ asKernel() [1/2]

virtual KernelObject * coco::Object::asKernel ( void  )
inlinevirtual

Reimplemented in coco::KernelObject.

Definition at line 81 of file Object.h.

81{ return nullptr; }

Referenced by coco::cast(), dump(), coco::isa< KernelObject >(), and coco::safe_cast().

◆ asKernel() [2/2]

virtual const KernelObject * coco::Object::asKernel ( void  ) const
inlinevirtual

Reimplemented in coco::KernelObject.

Definition at line 82 of file Object.h.

82{ return nullptr; }

◆ bag() [1/2]

void coco::Object::bag ( coco::Bag bag)
inline

Definition at line 75 of file Object.h.

75{ _dep.bag(bag); }
Bag * bag(void) const
Definition Dep.h:45
coco::Bag * bag(void) const
Definition Object.h:74

References coco::Dep::bag(), and bag().

◆ bag() [2/2]

◆ def()

Def * coco::Object::def ( void  ) const

Definition at line 33 of file Object.cpp.

33{ return _def; }

Referenced by coco::ObjectManager::destroy(), and coco::Def::value().

◆ kind()

virtual Kind coco::Object::kind ( void  ) const
inlinevirtual

Reimplemented in coco::FeatureObject, and coco::KernelObject.

Definition at line 71 of file Object.h.

71{ return Kind::Unknown; }

References Unknown.

◆ uses()

const UseSet * coco::Object::uses ( void  ) const

Definition at line 52 of file Object.cpp.

52{ return &_uses; }

Referenced by coco::ObjectManager::destroy(), and enco::subst().

Friends And Related Symbol Documentation

◆ Def

friend class Def
friend

Definition at line 40 of file Object.h.

◆ Use

friend class Use
friend

Definition at line 41 of file Object.h.


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