Class TemplateMultiAgg
- java.lang.Object
-
- org.apache.sysds.hops.codegen.template.TemplateBase
-
- org.apache.sysds.hops.codegen.template.TemplateCell
-
- org.apache.sysds.hops.codegen.template.TemplateMultiAgg
-
public class TemplateMultiAgg extends TemplateCell
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sysds.hops.codegen.template.TemplateCell
TemplateCell.HopInputComparator
-
Nested classes/interfaces inherited from class org.apache.sysds.hops.codegen.template.TemplateBase
TemplateBase.CloseType, TemplateBase.TemplateType
-
-
Constructor Summary
Constructors Constructor Description TemplateMultiAgg()
TemplateMultiAgg(TemplateBase.CloseType ctype)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TemplateBase.CloseType
close(Hop hop)
Indicates if the template must be closed at the current hop; either due to final operations (e.g., aggregate) or unsupported operations.Pair<Hop[],CNodeTpl>
constructCplan(Hop hop, CPlanMemoTable memo, boolean compileLiterals)
Constructs a single cplan rooted at the given hop, according to the plan given in the memo structure for this particular hop and its recursive inputs.boolean
fuse(Hop hop, Hop input)
Indicates if the template can be expanded to the given hop starting from an open template at the input.boolean
merge(Hop hop, Hop input)
Indicates if the template at the current hop can be expanded by merging another template available for one of its other inputs which is not yet covered by the template of the current hop.boolean
open(Hop hop)
Indicates if this template can be opened at the given hop, where hop represents bottom (first operation on the inputs) of the fused operator.
-
-
-
Constructor Detail
-
TemplateMultiAgg
public TemplateMultiAgg()
-
TemplateMultiAgg
public TemplateMultiAgg(TemplateBase.CloseType ctype)
-
-
Method Detail
-
open
public boolean open(Hop hop)
Description copied from class:TemplateBase
Indicates if this template can be opened at the given hop, where hop represents bottom (first operation on the inputs) of the fused operator.- Overrides:
open
in classTemplateCell
- Parameters:
hop
- current hop- Returns:
- true if template can be opened
-
fuse
public boolean fuse(Hop hop, Hop input)
Description copied from class:TemplateBase
Indicates if the template can be expanded to the given hop starting from an open template at the input.- Overrides:
fuse
in classTemplateCell
- Parameters:
hop
- current hopinput
- hop with open template of same type- Returns:
- true if the current hop can be fused into the operator.
-
merge
public boolean merge(Hop hop, Hop input)
Description copied from class:TemplateBase
Indicates if the template at the current hop can be expanded by merging another template available for one of its other inputs which is not yet covered by the template of the current hop.- Overrides:
merge
in classTemplateCell
- Parameters:
hop
- current hopinput
- direct input of current hop with available template- Returns:
- true if the the input hop can be fused into the current hop
-
close
public TemplateBase.CloseType close(Hop hop)
Description copied from class:TemplateBase
Indicates if the template must be closed at the current hop; either due to final operations (e.g., aggregate) or unsupported operations.- Overrides:
close
in classTemplateCell
- Parameters:
hop
- current hop- Returns:
- close type (closed invalid, closed valid, open)
-
constructCplan
public Pair<Hop[],CNodeTpl> constructCplan(Hop hop, CPlanMemoTable memo, boolean compileLiterals)
Description copied from class:TemplateBase
Constructs a single cplan rooted at the given hop, according to the plan given in the memo structure for this particular hop and its recursive inputs.- Overrides:
constructCplan
in classTemplateCell
- Parameters:
hop
- root of cplanmemo
- memoization table for partial subplanscompileLiterals
- if true compile non-integer literals as constants, otherwise variables. note: integer literals are always compiled as constants.- Returns:
- pair containing hops and code template
-
-