public static final class Fusing.BuildStructuralInfo
extends java.lang.Object
Collect structural information about a module tree while descending into it and performing normalization.
Constructor and Description |
---|
BuildStructuralInfo() |
Modifier and Type | Method and Description |
---|---|
StreamLayout.Atomic |
addModule(StreamLayout.Module m,
java.util.Set<StreamLayout.Module> group,
Attributes inheritedAttributes,
int indent,
Shape _oldShape)
Add a module to the given group, performing normalization (i.e.
|
void |
breakUpGroupsByDispatcher()
Fusable groups may contain modules with differing dispatchers, in which
case the group needs to be broken up.
|
java.util.Map<OutPort,InPort> |
downstreams()
The downstreams relationships of the original module rewritten in terms of
the copied ports.
|
void |
dump() |
void |
enterMatCtx() |
scala.collection.immutable.List<StreamLayout.CopiedModule> |
exitMatCtx() |
java.util.Deque<java.util.Set<StreamLayout.Module>> |
groups()
the list of all groups of modules that are within each async boundary
|
java.lang.String |
hash(java.lang.Object obj) |
java.util.Map<InPort,StreamLayout.Module> |
inOwners()
The owner mapping for the copied InPorts.
|
java.util.Set<OutPort> |
internalOuts()
List of internal wirings of GraphModules that were incorporated.
|
java.util.Set<StreamLayout.Module> |
modules()
the set of all contained modules
|
java.util.Set<StreamLayout.Module> |
newGroup(int indent)
Create and return a new grouping (i.e.
|
scala.collection.immutable.Seq<Inlet<?>> |
newInlets(scala.collection.immutable.Seq<Inlet<?>> old)
Transform original into copied Inlets.
|
java.util.Map<InPort,scala.collection.immutable.List<InPort>> |
newIns()
A stack of mappings for a given non-copied InPort.
|
scala.collection.immutable.Seq<Outlet<?>> |
newOutlets(scala.collection.immutable.Seq<Outlet<?>> old)
Transform original into copied Inlets.
|
java.util.Map<OutPort,scala.collection.immutable.List<OutPort>> |
newOuts()
A stack of mappings for a given non-copied OutPort.
|
java.util.Map<OutPort,java.util.Set<StreamLayout.Module>> |
outGroup()
a mapping from OutPort to its containing group, needed when determining
whether an upstream connection is internal or not
|
java.util.Map<OutPort,StreamLayout.Module> |
outOwners()
The owner mapping for the copied OutPorts.
|
java.lang.String |
printShape(Shape s) |
void |
pushMatSrc(StreamLayout.CopiedModule m) |
void |
registerInternals(Shape s,
int indent)
Register the outlets of the given Shape as sources for internal
connections within imported (and not dissolved) GraphModules.
|
void |
removeInternalWires()
Remove wirings that belong to the fused stages contained in GraphModules
that were incorporated in this fusing run.
|
void |
replace(StreamLayout.Module oldMod,
StreamLayout.Module newMod,
java.util.Set<StreamLayout.Module> localGroup) |
void |
rewire(Shape oldShape,
Shape newShape,
int indent)
Replace all mappings for a given shape with its new (copied) form.
|
<S extends Shape> |
toInfo(S shape,
scala.collection.immutable.List<scala.Tuple2<StreamLayout.Module,StreamLayout.MaterializedValueNode>> matValues,
Attributes attributes) |
java.util.Map<InPort,OutPort> |
upstreams()
The upstreams relationships of the original module rewritten in terms of
the copied ports.
|
void |
wire(OutPort out,
InPort in,
int indent)
Record a wiring between two copied ports, using (and reducing) the port
mappings.
|
public <S extends Shape> StreamLayout.StructuralInfoModule toInfo(S shape, scala.collection.immutable.List<scala.Tuple2<StreamLayout.Module,StreamLayout.MaterializedValueNode>> matValues, Attributes attributes)
public java.util.Set<StreamLayout.Module> modules()
public java.util.Deque<java.util.Set<StreamLayout.Module>> groups()
public void breakUpGroupsByDispatcher()
public java.util.Map<OutPort,java.util.Set<StreamLayout.Module>> outGroup()
public void replace(StreamLayout.Module oldMod, StreamLayout.Module newMod, java.util.Set<StreamLayout.Module> localGroup)
public java.util.Map<InPort,scala.collection.immutable.List<InPort>> newIns()
public java.util.Map<OutPort,scala.collection.immutable.List<OutPort>> newOuts()
public void enterMatCtx()
public scala.collection.immutable.List<StreamLayout.CopiedModule> exitMatCtx()
public void pushMatSrc(StreamLayout.CopiedModule m)
public java.util.Map<OutPort,InPort> downstreams()
public java.util.Map<InPort,OutPort> upstreams()
public java.util.Map<InPort,StreamLayout.Module> inOwners()
public java.util.Map<OutPort,StreamLayout.Module> outOwners()
public java.util.Set<OutPort> internalOuts()
public void registerInternals(Shape s, int indent)
s
- (undocumented)indent
- (undocumented)public void removeInternalWires()
public void dump()
public java.lang.String hash(java.lang.Object obj)
public java.lang.String printShape(Shape s)
public java.util.Set<StreamLayout.Module> newGroup(int indent)
indent
- (undocumented)public StreamLayout.Atomic addModule(StreamLayout.Module m, java.util.Set<StreamLayout.Module> group, Attributes inheritedAttributes, int indent, Shape _oldShape)
m
- (undocumented)group
- (undocumented)inheritedAttributes
- (undocumented)indent
- (undocumented)_oldShape
- (undocumented)public void wire(OutPort out, InPort in, int indent)
out
- (undocumented)in
- (undocumented)indent
- (undocumented)public void rewire(Shape oldShape, Shape newShape, int indent)
oldShape
- (undocumented)newShape
- (undocumented)indent
- (undocumented)public scala.collection.immutable.Seq<Inlet<?>> newInlets(scala.collection.immutable.Seq<Inlet<?>> old)
old
- (undocumented)