yosys-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SigSet< T, Compare > Struct Template Reference

#include <sigtools.h>

Data Structures

struct  bitDef_t
 

Public Member Functions

void clear ()
 
void insert (RTLIL::SigSpec sig, T data)
 
void insert (RTLIL::SigSpec sig, const std::set< T > &data)
 
void erase (RTLIL::SigSpec sig)
 
void erase (RTLIL::SigSpec sig, T data)
 
void erase (RTLIL::SigSpec sig, const std::set< T > &data)
 
void find (RTLIL::SigSpec sig, std::set< T > &result)
 
std::set< T > find (RTLIL::SigSpec sig)
 
bool has (RTLIL::SigSpec sig)
 

Data Fields

std::map< bitDef_t, std::set
< T, Compare > > 
bits
 

Detailed Description

template<typename T, class Compare = std::less<T>>
struct SigSet< T, Compare >

Definition at line 138 of file sigtools.h.

Member Function Documentation

template<typename T, class Compare = std::less<T>>
void SigSet< T, Compare >::clear ( )
inline

Definition at line 147 of file sigtools.h.

148  {
149  bits.clear();
150  }
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145

+ Here is the caller graph for this function:

template<typename T, class Compare = std::less<T>>
void SigSet< T, Compare >::erase ( RTLIL::SigSpec  sig)
inline

Definition at line 166 of file sigtools.h.

167  {
168  for (auto &bit : sig)
169  if (bit.wire != NULL)
170  bits[bit].clear();
171  }
#define NULL
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145
template<typename T, class Compare = std::less<T>>
void SigSet< T, Compare >::erase ( RTLIL::SigSpec  sig,
data 
)
inline

Definition at line 173 of file sigtools.h.

174  {
175  for (auto &bit : sig)
176  if (bit.wire != NULL)
177  bits[bit].erase(data);
178  }
#define NULL
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145
template<typename T, class Compare = std::less<T>>
void SigSet< T, Compare >::erase ( RTLIL::SigSpec  sig,
const std::set< T > &  data 
)
inline

Definition at line 180 of file sigtools.h.

181  {
182  for (auto &bit : sig)
183  if (bit.wire != NULL)
184  bits[bit].erase(data.begin(), data.end());
185  }
#define NULL
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145
template<typename T, class Compare = std::less<T>>
void SigSet< T, Compare >::find ( RTLIL::SigSpec  sig,
std::set< T > &  result 
)
inline

Definition at line 187 of file sigtools.h.

188  {
189  for (auto &bit : sig)
190  if (bit.wire != NULL) {
191  auto &data = bits[bit];
192  result.insert(data.begin(), data.end());
193  }
194  }
#define NULL
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145

+ Here is the caller graph for this function:

template<typename T, class Compare = std::less<T>>
std::set<T> SigSet< T, Compare >::find ( RTLIL::SigSpec  sig)
inline

Definition at line 196 of file sigtools.h.

197  {
198  std::set<T> result;
199  find(sig, result);
200  return result;
201  }
void find(RTLIL::SigSpec sig, std::set< T > &result)
Definition: sigtools.h:187
template<typename T, class Compare = std::less<T>>
bool SigSet< T, Compare >::has ( RTLIL::SigSpec  sig)
inline

Definition at line 203 of file sigtools.h.

204  {
205  for (auto &bit : sig)
206  if (bit.wire != NULL && bits.count(bit))
207  return true;
208  return false;
209  }
#define NULL
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145

+ Here is the caller graph for this function:

template<typename T, class Compare = std::less<T>>
void SigSet< T, Compare >::insert ( RTLIL::SigSpec  sig,
data 
)
inline

Definition at line 152 of file sigtools.h.

153  {
154  for (auto &bit : sig)
155  if (bit.wire != NULL)
156  bits[bit].insert(data);
157  }
#define NULL
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145

+ Here is the caller graph for this function:

template<typename T, class Compare = std::less<T>>
void SigSet< T, Compare >::insert ( RTLIL::SigSpec  sig,
const std::set< T > &  data 
)
inline

Definition at line 159 of file sigtools.h.

160  {
161  for (auto &bit : sig)
162  if (bit.wire != NULL)
163  bits[bit].insert(data.begin(), data.end());
164  }
#define NULL
std::map< bitDef_t, std::set< T, Compare > > bits
Definition: sigtools.h:145

Field Documentation

template<typename T, class Compare = std::less<T>>
std::map<bitDef_t, std::set<T, Compare> > SigSet< T, Compare >::bits

Definition at line 145 of file sigtools.h.


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