Class BinaryOp

  • All Implemented Interfaces:

    public class BinaryOp
    extends MultiThreadedHop
    Binary (cell operations): aij + bij Properties: Symbol: *, -, +, ... 2 Operands Semantic: align indices (sort), then perform operation
    • Method Detail

      • checkArity

        public void checkArity()
        Description copied from class: Hop
        Check whether this Hop has a correct number of inputs. (Some Hops can have a variable number of inputs, such as DataOp, DataGenOp, ParameterizedBuiltinOp, ReorgOp, TernaryOp, QuaternaryOp, MultipleOp, DnnOp, and SpoofFusedOp.) Parameterized Hops (such as DataOp) can check that the number of parameters matches the number of inputs.
        Specified by:
        checkArity in class Hop
      • setOuterVectorOperation

        public void setOuterVectorOperation​(boolean flag)
      • isOuter

        public boolean isOuter()
      • isInplace

        public boolean isInplace()
      • isGPUEnabled

        public boolean isGPUEnabled()
        Description copied from class: Hop
        In memory-based optimizer mode (see OptimizerUtils.isMemoryBasedOptLevel()), the exectype is determined by checking this method as well as memory budget of this Hop. Please see findExecTypeByMemEstimate for more detail. This method is necessary because not all operator are supported efficiently on GPU (for example: operations on frames and scalar as well as operations such as table).
        Specified by:
        isGPUEnabled in class Hop
        true if the Hop is eligible for GPU Exectype.
      • allowsAllExecTypes

        public boolean allowsAllExecTypes()
        Specified by:
        allowsAllExecTypes in class Hop
      • footprintInMapper

        public static double footprintInMapper​(long m1_dim1,
                                               long m1_dim2,
                                               long m2_dim1,
                                               long m2_dim2,
                                               long m1_rpb,
                                               long m1_cpb)
        Estimates the memory footprint of MapMult operation depending on which input is put into distributed cache. This function is called by optFindAppendMethod() to decide the execution strategy, as well as by piggybacking to decide the number of Map-side instructions to put into a single GMR job.
        m1_dim1 - ?
        m1_dim2 - ?
        m2_dim1 - ?
        m2_dim2 - ?
        m1_rpb - ?
        m1_cpb - ?
        memory footprint estimate
      • requiresReplication

        public static boolean requiresReplication​(Hop left,
                                                  Hop right)
      • refreshSizeInformation

        public void refreshSizeInformation()
        Description copied from class: Hop
        Update the output size information for this hop.
        Specified by:
        refreshSizeInformation in class Hop
      • compare

        public boolean compare​(Hop that)
        Specified by:
        compare in class Hop
      • supportsMatrixScalarOperations

        public boolean supportsMatrixScalarOperations()
      • isPPredOperation

        public boolean isPPredOperation()
      • getComplementPPredOperation

        public Types.OpOp2 getComplementPPredOperation()