Class MaterializeAtomic

  • All Implemented Interfaces:
    Traversal, java.io.Serializable, scala.Equals, scala.Product, scala.Serializable

    public final class MaterializeAtomic
    extends java.lang.Object
    implements Traversal, scala.Product, scala.Serializable
    INTERNAL API

    Arriving at this step means that an atomic module needs to be materialized (or any other activity which assigns something to wired output-input port pairs).

    The traversing party must assign port numbers in the following way: - input ports are implicitly assigned to numbers. Every module's input ports are assigned to consecutive numbers according to their order in the shape. In other words, the materializer only needs to keep a counter and increment it for every visited input port. - the assigned number of the first input port for every module should be saved while materializing the module. every output port should be assigned to (base + outToSlots(out.id)) where base is the number of the first input port of the module (or the last unused input number if it has no input ports) and outToSlots is the array provided by the traversal step.

    Since the above two rules always require local only computations (except a counter) this achieves positional independence of materializations.

    See the TraversalTestUtils class and the testMaterialize method for a simple example.

    See Also:
    Serialized Form
    • Method Detail

      • outToSlots

        public int[] outToSlots()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • copy$default$2

        public int[] copy$default$2()
      • productPrefix

        public java.lang.String productPrefix()
        Specified by:
        productPrefix in interface scala.Product
      • productArity

        public int productArity()
        Specified by:
        productArity in interface scala.Product
      • productElement

        public java.lang.Object productElement​(int x$1)
        Specified by:
        productElement in interface scala.Product
      • productIterator

        public scala.collection.Iterator<java.lang.Object> productIterator()
        Specified by:
        productIterator in interface scala.Product
      • canEqual

        public boolean canEqual​(java.lang.Object x$1)
        Specified by:
        canEqual in interface scala.Equals
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object x$1)
        Specified by:
        equals in interface scala.Equals
        Overrides:
        equals in class java.lang.Object