Packages

case class ProgramGraph(roots: Seq[Scalan.Sym], mapping: Nullable[Scalan.Transformer], filterNode: Nullable[(Scalan.Sym) ⇒ Boolean]) extends Scalan.AstGraph with Product with Serializable

Immutable graph collected from roots following Ref.node.deps links.

Linear Supertypes
Serializable, Serializable, Scalan.AstGraph, Scalan.Node, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ProgramGraph
  2. Serializable
  3. Serializable
  4. AstGraph
  5. Node
  6. Product
  7. Equals
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ProgramGraph(root: Scalan.Sym)
  2. new ProgramGraph(roots: Seq[Scalan.Sym], filterNode: Nullable[(Scalan.Sym) ⇒ Boolean] = Nullable.None)
  3. new ProgramGraph(roots: Seq[Scalan.Sym], mapping: Nullable[Scalan.Transformer], filterNode: Nullable[(Scalan.Sym) ⇒ Boolean])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. lazy val allNodes: Map[Int, Scalan.GraphNode]
    Definition Classes
    AstGraph
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def boundVars: Nil.type

    If this graph represent Lambda abstraction, the boundVars is lambda bound symbols.

    If this graph represent Lambda abstraction, the boundVars is lambda bound symbols. otherwise this is empty set.

    Definition Classes
    ProgramGraphAstGraph
  7. final def buildFlatSchedule(schedule: Scalan.Schedule, flatBuf: Buffer[Scalan.Sym]): Unit

    Flatten the given schedule into single sequence of non-AstGraph definitions.

    Flatten the given schedule into single sequence of non-AstGraph definitions. All scope forming definitions like Lambda and ThunkDef are recursively unfolded in the given buffer flatBuf. NOTE: The symbols of AstGraph-like definitions are added to flatBuf AFTER the unfolded body.

    Definition Classes
    AstGraph
  8. def buildUsageMap(schedule: Scalan.Schedule, usingDeps: Boolean): Map[Int, Scalan.GraphNode]

    Build usage information induced by the given schedule.

    Build usage information induced by the given schedule. For each symbol of the schedule a GraphNode is created and usages are collected. HOTSPOT: don't beautify the code

    Definition Classes
    AstGraph
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  10. final def deps: Array[Scalan.Sym]

    Dependencies of this definition from other definitions.

    Dependencies of this definition from other definitions. If definition is interpreted as an operation, then dependencies are arguments of the operation. If definition if compound (like Lambda of ThunkDef) then deps is equals to free variables used in the body of the compound definition. This array also refers to predecessors of this graph node, so it is used to build topological ordering (execution schedule) of operations.

    returns

    array of referencies to other definitions.

    Definition Classes
    Node
  11. lazy val domain: Set[Int]

    Set of symbol ids in the schedule.

    Set of symbol ids in the schedule. Can be used to quickly recognize symbols belonging to the body of this definition.

    Definition Classes
    AstGraph
  12. final def elements: Array[AnyRef]

    All data elements of this graph node to be used in structural equality.

    All data elements of this graph node to be used in structural equality.

    Definition Classes
    Node
    See also

    equals where elements are used.

  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(other: Any): Boolean

    Default equality of definitions.

    Default equality of definitions. Two definitions are equal if they have same elements.

    Definition Classes
    Node → Equals → AnyRef → Any
  15. val filterNode: Nullable[(Scalan.Sym) ⇒ Boolean]
  16. lazy val flatSchedule: Scalan.Schedule
    Definition Classes
    AstGraph
  17. def freeVars: ArraySeq[Scalan.Sym]

    Collect a set of symbols used in the graph but which are not part of its schedule.

    Collect a set of symbols used in the graph but which are not part of its schedule. If the graph represents a compound definition (Lambda, Thunk etc), then each item in freeVars is used in the body, but not part of it. Intersection of free vars with bound vars is empty. HOTSPOT: don't beautify the code

    Definition Classes
    ProgramGraphAstGraph
  18. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  19. def getDeps: Array[Scalan.Sym]

    Override to redefine how dependencies are computed.

    Override to redefine how dependencies are computed. For example, in core implementation this is overriden in Lambda and ThunkDef using freeVars.

    Attributes
    protected
    Definition Classes
    Node
  20. def globalUsagesOf(s: Scalan.Sym): Buffer[Scalan.Sym]
    Definition Classes
    AstGraph
  21. def hasManyUsages(s: Scalan.Sym): Boolean
    Definition Classes
    AstGraph
  22. def hasManyUsagesGlobal(s: Scalan.Sym): Boolean
    Definition Classes
    AstGraph
  23. def hashCode(): Int

    Computed once and saved to avoid repeated computations, which is not necessary because definitions are immutable by default.

    Computed once and saved to avoid repeated computations, which is not necessary because definitions are immutable by default. If some definition require mutability, this method can be overriden accordingly.

    Definition Classes
    Node → AnyRef → Any
  24. def isBoundVar(s: Scalan.Sym): Boolean

    Checks the symbol is lambda bound.

    Checks the symbol is lambda bound.

    Definition Classes
    AstGraph
    Annotations
    @inline()
  25. def isIdentity: Boolean

    Whether this graph represents identity function.

    Whether this graph represents identity function.

    Definition Classes
    ProgramGraphAstGraph
  26. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  27. final def isLocalDef(s: Scalan.Sym): Boolean
    Definition Classes
    AstGraph
    Annotations
    @inline()
  28. final def isLocalDefId(id: Int): Boolean
    Definition Classes
    AstGraph
    Annotations
    @inline()
  29. final def isRoot(s: Scalan.Sym): Boolean
    Definition Classes
    AstGraph
    Annotations
    @inline()
  30. val mapping: Nullable[Scalan.Transformer]
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def nodeId: Int

    Unique id of the graph node assigned for each new instance using freshId generator.

    Unique id of the graph node assigned for each new instance using freshId generator. Doesn't participate in equality of this Def, thus definitions with different ids may still be structurally equal. Used to provide global Def numbering.

    Definition Classes
    Node
    Annotations
    @inline()
  33. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  34. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  35. lazy val rootIds: Buffer[Int]

    Extract identifies out of roots.

    Extract identifies out of roots.

    Definition Classes
    ProgramGraphAstGraph
  36. val roots: Seq[Scalan.Sym]

    Terminal nodes of the graph.

    Terminal nodes of the graph. There are incoming, but no outgoing edges.

    Definition Classes
    ProgramGraphAstGraph
  37. lazy val schedule: Scalan.Schedule

    Sequence of node references forming a schedule.

    Sequence of node references forming a schedule. HOTSPOT: don't beautify the code

    Definition Classes
    AstGraph
  38. lazy val scheduleIds: Buffer[Int]

    Schedule represents a body of compound definition - topologically ordered sequence of nodes of the graph.

    Schedule represents a body of compound definition - topologically ordered sequence of nodes of the graph. It is implemented differently depending on node type.

    Definition Classes
    ProgramGraphAstGraph
    See also

    Lambda, ThunkDef

  39. def show(config: GraphVizConfig): Unit
    Definition Classes
    AstGraph
  40. def show(emitMetadata: Boolean): Unit
    Definition Classes
    AstGraph
  41. def show(): Unit
    Definition Classes
    AstGraph
  42. final def syms: Array[Scalan.Sym]

    References to other nodes in this Def instance.

    References to other nodes in this Def instance. Note: This is different form deps for compound definitions like Lambda and ThunkDef.

    Definition Classes
    Node
  43. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  44. def toString(): String

    User readable string representation of this definition.

    User readable string representation of this definition. (for debugging only)

    Definition Classes
    ProgramGraphNode → AnyRef → Any
  45. def transform(m: Scalan.Mirror, rw: Scalan.Rewriter, t: Scalan.Transformer): Scalan.ProgramGraph

    Mirror all the nodes of this graph applying transformer and performing rewriting.

    Mirror all the nodes of this graph applying transformer and performing rewriting.

    m

    mirror instance to be used for mirroring of nodes

    rw

    rewriter to be tried for each new created mirrored node

    t

    transformer of symbols, to be used for substitution of symbols in the new nodes.

    returns

    new graph which is not necessary clone of this graph, but should be semantically equivalent to this graph (provided all rw rules preserve equivalence). If rw is identity, then the resulting graph is alpha-equivalent to this graph as long as t is bijection.

  46. lazy val usageMap: Map[Int, Scalan.GraphNode]

    Symbol Usage information for this graph

    Symbol Usage information for this graph

    Definition Classes
    AstGraph
  47. def usagesOf(id: Int): Buffer[Int]

    HOTSPOT: for performance we return mutable structure, but it should never be changed.

    HOTSPOT: for performance we return mutable structure, but it should never be changed.

    Definition Classes
    AstGraph
  48. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  50. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. def withoutContext: Scalan.ProgramGraph

    Remove transformer component of the graph.

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Serializable

Inherited from Scalan.AstGraph

Inherited from Scalan.Node

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped