CGRA-ME
Public Member Functions | Public Attributes | Private Attributes | List of all members
Mapping Class Reference

#include <Mapping.h>

Public Member Functions

 Mapping (std::shared_ptr< CGRA > cgra, int II, std::shared_ptr< OpGraph > opgraph)
 
 ~Mapping ()
 
bool isMapped () const
 
bool isTimeout () const
 
MappingStatus getStatus () const
 
void setStatus (MappingStatus new_status)
 
CGRAgetCGRA () const
 
auto getCGRA_shared () const
 
int getII () const
 
std::map< OpGraph::NodeDescriptor, std::vector< MRRG::NodeDescriptor > > & getMapping ()
 
const std::map< OpGraph::NodeDescriptor, std::vector< MRRG::NodeDescriptor > > & getMapping () const
 
bool hasMapping (OpGraph::NodeDescriptor key) const
 
void assertHasMapping (OpGraph::NodeDescriptor key) const
 
bool hasSingleMapping (OpGraph::NodeDescriptor key) const
 
void assertHasSingleMapping (OpGraph::NodeDescriptor key) const
 
MRRG::NodeDescriptor getSingleMapping (OpGraph::NodeDescriptor key) const
 
const std::vector< MRRG::NodeDescriptor > & getMappingList (OpGraph::NodeDescriptor key) const
 
void setMapping (std::map< OpGraph::NodeDescriptor, std::vector< MRRG::NodeDescriptor >> mapping)
 
void setNodeMapping (OpGraph::NodeDescriptor, std::vector< MRRG::NodeDescriptor > mapping)
 
void mapMRRGNode (OpGraph::NodeDescriptor, MRRG::NodeDescriptor node)
 
void unmapMRRGNode (OpGraph::NodeDescriptor, MRRG::NodeDescriptor node)
 
void clear ()
 
void outputMapping (std::ostream &o=std::cout) const
 
void outputMapping (const OpGraph &opgraph, std::ostream &o) const
 
void outputDetailedMapping (std::ostream &o=std::cout) const
 
void outputValMapping (OpGraphVal *val, std::ostream &o=std::cout) const
 
void check () const
 
bool verifyOpGraphMappingConnectivity ()
 
OpGraphgetOpGraph ()
 
const OpGraphgetOpGraph () const
 
template<typename F >
void forEachMappingList (F &&f) const
 
template<typename F >
void forEachMapping (F &&f) const
 

Public Attributes

double solve_time_in_seconds = -1
 

Private Attributes

std::map< OpGraph::NodeDescriptor, std::vector< MRRG::NodeDescriptor > > mapping = {}
 
std::shared_ptr< CGRAcgra
 
int II
 
std::shared_ptr< OpGraphopgraph
 
MappingStatus status = MappingStatus::failure
 

Detailed Description

Definition at line 31 of file Mapping.h.

Constructor & Destructor Documentation

◆ Mapping()

Mapping::Mapping ( std::shared_ptr< CGRA cgra,
int  II,
std::shared_ptr< OpGraph opgraph 
)

Definition at line 37 of file Mapping.cpp.

◆ ~Mapping()

Mapping::~Mapping ( )

Definition at line 44 of file Mapping.cpp.

Member Function Documentation

◆ assertHasMapping()

void Mapping::assertHasMapping ( OpGraph::NodeDescriptor  key) const
inline

Definition at line 51 of file Mapping.h.

◆ assertHasSingleMapping()

void Mapping::assertHasSingleMapping ( OpGraph::NodeDescriptor  key) const
inline

Definition at line 54 of file Mapping.h.

◆ check()

void Mapping::check ( ) const

Definition at line 284 of file Mapping.cpp.

◆ clear()

void Mapping::clear ( )

Definition at line 95 of file Mapping.cpp.

◆ forEachMapping()

template<typename F >
void Mapping::forEachMapping ( F &&  f) const
inline

Definition at line 93 of file Mapping.h.

◆ forEachMappingList()

template<typename F >
void Mapping::forEachMappingList ( F &&  f) const
inline

Definition at line 86 of file Mapping.h.

◆ getCGRA()

CGRA * Mapping::getCGRA ( ) const

Definition at line 48 of file Mapping.cpp.

◆ getCGRA_shared()

auto Mapping::getCGRA_shared ( ) const
inline

Definition at line 43 of file Mapping.h.

◆ getII()

int Mapping::getII ( ) const

Definition at line 53 of file Mapping.cpp.

◆ getMapping() [1/2]

std::map<OpGraph::NodeDescriptor,std::vector<MRRG::NodeDescriptor> >& Mapping::getMapping ( )
inline

Definition at line 47 of file Mapping.h.

◆ getMapping() [2/2]

const std::map<OpGraph::NodeDescriptor,std::vector<MRRG::NodeDescriptor> >& Mapping::getMapping ( ) const
inline

Definition at line 48 of file Mapping.h.

◆ getMappingList()

const std::vector<MRRG::NodeDescriptor>& Mapping::getMappingList ( OpGraph::NodeDescriptor  key) const
inline

Definition at line 57 of file Mapping.h.

◆ getOpGraph() [1/2]

OpGraph& Mapping::getOpGraph ( )
inline

Definition at line 82 of file Mapping.h.

◆ getOpGraph() [2/2]

const OpGraph& Mapping::getOpGraph ( ) const
inline

Definition at line 83 of file Mapping.h.

◆ getSingleMapping()

MRRG::NodeDescriptor Mapping::getSingleMapping ( OpGraph::NodeDescriptor  key) const
inline

Definition at line 56 of file Mapping.h.

◆ getStatus()

MappingStatus Mapping::getStatus ( ) const
inline

Definition at line 39 of file Mapping.h.

◆ hasMapping()

bool Mapping::hasMapping ( OpGraph::NodeDescriptor  key) const
inline

Definition at line 50 of file Mapping.h.

◆ hasSingleMapping()

bool Mapping::hasSingleMapping ( OpGraph::NodeDescriptor  key) const
inline

Definition at line 53 of file Mapping.h.

◆ isMapped()

bool Mapping::isMapped ( ) const
inline

Definition at line 37 of file Mapping.h.

◆ isTimeout()

bool Mapping::isTimeout ( ) const
inline

Definition at line 38 of file Mapping.h.

◆ mapMRRGNode()

void Mapping::mapMRRGNode ( OpGraph::NodeDescriptor  opnode,
MRRG::NodeDescriptor  node 
)

Definition at line 58 of file Mapping.cpp.

◆ outputDetailedMapping()

void Mapping::outputDetailedMapping ( std::ostream &  o = std::cout) const

Definition at line 243 of file Mapping.cpp.

◆ outputMapping() [1/2]

void Mapping::outputMapping ( const OpGraph opgraph,
std::ostream &  o 
) const

Definition at line 224 of file Mapping.cpp.

◆ outputMapping() [2/2]

void Mapping::outputMapping ( std::ostream &  o = std::cout) const
inline

Definition at line 72 of file Mapping.h.

◆ outputValMapping()

void Mapping::outputValMapping ( OpGraphVal val,
std::ostream &  o = std::cout 
) const

Definition at line 266 of file Mapping.cpp.

◆ setMapping()

void Mapping::setMapping ( std::map< OpGraph::NodeDescriptor, std::vector< MRRG::NodeDescriptor >>  mapping)

Definition at line 86 of file Mapping.cpp.

◆ setNodeMapping()

void Mapping::setNodeMapping ( OpGraph::NodeDescriptor  node,
std::vector< MRRG::NodeDescriptor mapping 
)

Definition at line 91 of file Mapping.cpp.

◆ setStatus()

void Mapping::setStatus ( MappingStatus  new_status)
inline

Definition at line 40 of file Mapping.h.

◆ unmapMRRGNode()

void Mapping::unmapMRRGNode ( OpGraph::NodeDescriptor  opnode,
MRRG::NodeDescriptor  node 
)

Definition at line 70 of file Mapping.cpp.

◆ verifyOpGraphMappingConnectivity()

bool Mapping::verifyOpGraphMappingConnectivity ( )

Definition at line 122 of file Mapping.cpp.

Member Data Documentation

◆ cgra

std::shared_ptr<CGRA> Mapping::cgra
private

Definition at line 104 of file Mapping.h.

◆ II

int Mapping::II
private

Definition at line 105 of file Mapping.h.

◆ mapping

std::map<OpGraph::NodeDescriptor,std::vector<MRRG::NodeDescriptor> > Mapping::mapping = {}
private

Definition at line 102 of file Mapping.h.

◆ opgraph

std::shared_ptr<OpGraph> Mapping::opgraph
private

Definition at line 106 of file Mapping.h.

◆ solve_time_in_seconds

double Mapping::solve_time_in_seconds = -1

Definition at line 110 of file Mapping.h.

◆ status

MappingStatus Mapping::status = MappingStatus::failure
private

Definition at line 108 of file Mapping.h.


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