Verilog to Routing - VPR
|
#include "vtr_vector_map.h"
#include <set>
Go to the source code of this file.
Functions | |
template<typename T > | |
bool | are_contiguous (vtr::vector_map< T, T > &values) |
Returns true if all elements are contiguously ascending values (i.e. equal to their index) More... | |
template<typename Container > | |
bool | all_valid (const Container &values) |
Returns true if all elements in the vector 'values' evaluate true. More... | |
template<typename Id > | |
vtr::vector_map< Id, Id > | compress_ids (const vtr::vector_map< Id, Id > &ids) |
Builds a mapping from old to new ids by skipping values marked invalid. More... | |
template<typename Id , typename T > | |
vtr::vector_map< Id, T > | clean_and_reorder_values (const vtr::vector_map< Id, T > &values, const vtr::vector_map< Id, Id > &id_map) |
Returns a vector based on 'values', which has had entries dropped & re-ordered according according to 'id_map'. More... | |
template<typename Id > | |
vtr::vector_map< Id, Id > | clean_and_reorder_ids (const vtr::vector_map< Id, Id > &id_map) |
Returns the set of new valid Ids defined by 'id_map'. More... | |
template<typename R , typename Id > | |
size_t | count_valid_refs (R range, const vtr::vector_map< Id, Id > &id_map) |
Count how many of the Id's referenced in 'range' have a valid new mapping in 'id_map'. More... | |
template<typename Container , typename ValId > | |
Container | update_all_refs (const Container &values, const vtr::vector_map< ValId, ValId > &id_map) |
Updates the Ids in 'values' based on id_map, even if the original or new mapping is not valid. More... | |
template<typename Container , typename ValId > | |
Container | update_valid_refs (const Container &values, const vtr::vector_map< ValId, ValId > &id_map, const std::set< size_t > &preserved_indices={}) |
bool all_valid | ( | const Container & | values | ) |
Returns true if all elements in the vector 'values' evaluate true.
bool are_contiguous | ( | vtr::vector_map< T, T > & | values | ) |
Returns true if all elements are contiguously ascending values (i.e. equal to their index)
vtr::vector_map<Id, Id> clean_and_reorder_ids | ( | const vtr::vector_map< Id, Id > & | id_map | ) |
Returns the set of new valid Ids defined by 'id_map'.
TODO: merge with clean_and_reorder_values
vtr::vector_map<Id, T> clean_and_reorder_values | ( | const vtr::vector_map< Id, T > & | values, |
const vtr::vector_map< Id, Id > & | id_map | ||
) |
Returns a vector based on 'values', which has had entries dropped & re-ordered according according to 'id_map'.
Each entry in id_map corresponds to the assoicated element in 'values'. The value of the id_map entry is the new ID of the entry in values.
If it is an invalid ID, the element in values is dropped. Otherwise the element is moved to the new ID location.
vtr::vector_map<Id, Id> compress_ids | ( | const vtr::vector_map< Id, Id > & | ids | ) |
Builds a mapping from old to new ids by skipping values marked invalid.
size_t count_valid_refs | ( | R | range, |
const vtr::vector_map< Id, Id > & | id_map | ||
) |
Count how many of the Id's referenced in 'range' have a valid new mapping in 'id_map'.
Container update_all_refs | ( | const Container & | values, |
const vtr::vector_map< ValId, ValId > & | id_map | ||
) |
Updates the Ids in 'values' based on id_map, even if the original or new mapping is not valid.
Container update_valid_refs | ( | const Container & | values, |
const vtr::vector_map< ValId, ValId > & | id_map, | ||
const std::set< size_t > & | preserved_indices = {} |
||
) |