ONE - On-device Neural Engine
Loading...
Searching...
No Matches
nnc::ArtifactModule Class Reference

Class representing a module in the ACL C++ soft backend. More...

#include <ArtifactModel.h>

Public Member Functions

 ArtifactModule (std::string name)
 
void accept (IArtifactGenerator *g) const
 
std::shared_ptr< ArtifactClasscreateClass (const std::string &name)
 
void addHeaderInclude (const std::string &name)
 
void addSourceInclude (const std::string &name)
 
void addHeaderSysInclude (const std::string &name)
 
void addSourceSysInclude (const std::string &name)
 
const std::string & name () const
 
const std::list< std::shared_ptr< ArtifactEntity > > entities () const
 
const std::list< std::string > & headerIncludes () const
 
const std::list< std::string > & sourceIncludes () const
 
const std::list< std::string > & headerSysIncludes () const
 
const std::list< std::string > & sourceSysIncludes () const
 

Detailed Description

Class representing a module in the ACL C++ soft backend.

Definition at line 696 of file ArtifactModel.h.

Constructor & Destructor Documentation

◆ ArtifactModule()

nnc::ArtifactModule::ArtifactModule ( std::string  name)
inlineexplicit

Definition at line 699 of file ArtifactModel.h.

699: _name(std::move(name)) {}
const std::string & name() const

Member Function Documentation

◆ accept()

void nnc::ArtifactModule::accept ( IArtifactGenerator g) const
inline

Definition at line 701 of file ArtifactModel.h.

701{ g->visit(this); }

Referenced by nnc::AclCppCodeGenerator::run().

◆ addHeaderInclude()

void nnc::ArtifactModule::addHeaderInclude ( const std::string &  name)
inline

Definition at line 710 of file ArtifactModel.h.

710{ _headerIncludes.push_back(name); }

References name().

Referenced by nnc::AclCppOpGenerator::generate().

◆ addHeaderSysInclude()

void nnc::ArtifactModule::addHeaderSysInclude ( const std::string &  name)
inline

Definition at line 712 of file ArtifactModel.h.

712{ _headerSysIncludes.push_back(name); }

References name().

Referenced by nnc::AclCppOpGenerator::generate().

◆ addSourceInclude()

void nnc::ArtifactModule::addSourceInclude ( const std::string &  name)
inline

Definition at line 711 of file ArtifactModel.h.

711{ _sourceIncludes.push_back(name); }

References name().

◆ addSourceSysInclude()

void nnc::ArtifactModule::addSourceSysInclude ( const std::string &  name)
inline

Definition at line 713 of file ArtifactModel.h.

713{ _sourceSysIncludes.push_back(name); }

References name().

◆ createClass()

std::shared_ptr< ArtifactClass > nnc::ArtifactModule::createClass ( const std::string &  name)
inline

Definition at line 703 of file ArtifactModel.h.

704 {
705 auto a_class = std::make_shared<ArtifactClass>(name);
706 _entities.emplace_back(a_class);
707 return a_class;
708 }

References name().

Referenced by nnc::AclCppOpGenerator::generate().

◆ entities()

const std::list< std::shared_ptr< ArtifactEntity > > nnc::ArtifactModule::entities ( ) const
inline

Definition at line 716 of file ArtifactModel.h.

716{ return _entities; }

Referenced by nnc::ArtifactGeneratorCppCode::visit(), and nnc::ArtifactGeneratorCppDecl::visit().

◆ headerIncludes()

const std::list< std::string > & nnc::ArtifactModule::headerIncludes ( ) const
inline

Definition at line 717 of file ArtifactModel.h.

717{ return _headerIncludes; }

Referenced by nnc::ArtifactGeneratorCppDecl::visit().

◆ headerSysIncludes()

const std::list< std::string > & nnc::ArtifactModule::headerSysIncludes ( ) const
inline

Definition at line 719 of file ArtifactModel.h.

719{ return _headerSysIncludes; }

Referenced by nnc::ArtifactGeneratorCppDecl::visit().

◆ name()

const std::string & nnc::ArtifactModule::name ( ) const
inline

◆ sourceIncludes()

const std::list< std::string > & nnc::ArtifactModule::sourceIncludes ( ) const
inline

Definition at line 718 of file ArtifactModel.h.

718{ return _sourceIncludes; }

Referenced by nnc::ArtifactGeneratorCppCode::visit().

◆ sourceSysIncludes()

const std::list< std::string > & nnc::ArtifactModule::sourceSysIncludes ( ) const
inline

Definition at line 720 of file ArtifactModel.h.

720{ return _sourceSysIncludes; }

Referenced by nnc::ArtifactGeneratorCppCode::visit().


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