#include <MapSplit.h>
A Mapping split off as a subset of another Mapping.
◆ MapSplit() [1/3]
ast::MapSplit::MapSplit |
( |
Mapping const & |
map, |
|
|
std::vector< int > const & |
in |
|
) |
| |
|
explicit |
Construct a MapSplit
The subset is specified by choosing a subset of inputs from an existing Mapping. Such a split is only possible if the specified inputs correspond to some subset of the original Mapping's outputs. That is, there must exist a subset of the Mapping outputs for which each output depends only on the selected Mapping inputs, and not on any of the inputs which have not been selected. Also, any output which is not in this subset must not depend on any of the selected inputs.
- Parameters
-
[in] | map | Mapping to split. |
[in] | in | Indices of inputs of map to pick. Each element should have a value in the range [1, map.getNIn()]. |
- Exceptions
-
std::runtime_error | if map cannot be split as specified. |
◆ MapSplit() [2/3]
ast::MapSplit::MapSplit |
( |
MapSplit const & |
| ) |
|
|
default |
◆ MapSplit() [3/3]
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ origIn
std::vector<int> ast::MapSplit::origIn |
Indices of the inputs of the original mapping were picked for the split mapping
This is a copy of the in
argument of the constructor.
◆ origOut
std::vector<int> ast::MapSplit::origOut |
Indices of the outputs of the original mapping which are fed by the picked inputs.
This will contain splitMap->getNOut() elements, each in the range [1, nout of the original mapping]. The i
th element holds the index within the original mapping which corresponds to the i
th output of the split mapping. For example if the 1st output of the split mapping came from the 5th output of the original mapping, then origOut[0] = 5 (0 because vectors use 0-based indexing, and 5 because AST index values are 1-based).
◆ splitMap
std::shared_ptr<Mapping> ast::MapSplit::splitMap |
The documentation for this class was generated from the following files: