Class TemplateUtils
java.lang.Object
org.apache.sysds.hops.codegen.template.TemplateUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancontainsBinary(CNode node, CNodeBinary.BinType type) static booleanstatic booleancontainsOuterProduct(Hop hop) static booleancontainsOuterProduct(Hop hop, Hop probe) static intstatic CNodeDatacreateCNodeData(Hop hop, boolean compileLiterals) static TemplateBase[]static TemplateBasestatic TemplateBasestatic intdetermineMinVectorIntermediates(CNode node, CNode main) static LinkedList<Long>static Types.AggOpgetAllParents(CNode node) static voidstatic SpoofCellwise.CellTypegetCellType(Hop hop) static CNodeDatagetLiteral(CNode node) static intgetMaxLiveVectorIntermediates(CNode node, CNode main, Map<Long, Set<Long>> parents, Set<org.apache.commons.lang3.tuple.Pair<Long, Long>> stack) static intgetOuterProductType(Hop X, Hop U, Hop V, Hop out) static longgetRowTemplateMatrixInput(Hop current, CPlanMemoTable memo) static SpoofRowwise.RowTypegetRowType(Hop output, Hop... inputs) static booleanhasCommonRowTemplateMatrixInput(Hop input1, Hop input2, CPlanMemoTable memo) static booleanhasMatrixInput(Hop hop) static booleanhasNoOperation(CNodeTpl tpl) static booleanstatic booleanstatic booleanstatic booleanisBinary(CNode node, CNodeBinary.BinType... types) static booleanstatic booleanstatic booleanisColVector(CNode hop) static booleanisColVector(Hop hop) static booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanstatic booleanisRowVector(CNode hop) static booleanisTernary(CNode node, CNodeTernary.TernaryType... types) static booleanisType(TemplateBase.TemplateType type, TemplateBase.TemplateType... validTypes) static booleanisUnary(CNode node, CNodeUnary.UnaryType... types) static booleanisUnaryOperatorPipeline(CNode node) static booleanisUnaryRowAgg(CNode node) static booleanisValidNumVectorIntermediates(CNode node, CNode main, Map<Long, Set<Long>> parents, Map<Long, org.apache.commons.lang3.tuple.Pair<Long, org.apache.commons.lang3.mutable.MutableInt>> inUse, Set<Long> inUse2, int count) static booleanstatic booleanstatic booleanisVectorOrScalar(Hop hop) static booleanrContainsBinary(CNode node, CNodeBinary.BinType type) static booleanrContainsInput(CNode node, long hopID) static voidrFlipVectorLookups(CNode current) static booleanrIsSparseSafeOnly(CNode node, CNodeBinary.BinType... types) static booleanrIsValidNumVectorIntermediates(CNode node, CNode main, Map<Long, Set<Long>> parents, Map<Long, org.apache.commons.lang3.tuple.Pair<Long, org.apache.commons.lang3.mutable.MutableInt>> inUse, Set<Long> inUse2, IDSequence buff) static longstatic CNodestatic CNodewrapLookupIfNecessary(CNode node, Hop hop) static CNodewrapLookupIfNecessary(CNode node, Hop hop, boolean rowTpl)
-
Field Details
-
TEMPLATES
-
-
Constructor Details
-
TemplateUtils
public TemplateUtils()
-
-
Method Details
-
isVector
-
isColVector
-
isColVector
-
isRowVector
-
isMatrix
-
wrapLookupIfNecessary
-
wrapLookupIfNecessary
-
isMatrix
-
isVectorOrScalar
-
isBinaryMatrixRowVector
-
isBinaryMatrixColVector
-
hasMatrixInput
-
isOperationSupported
-
createTemplate
-
createTemplate
public static TemplateBase createTemplate(TemplateBase.TemplateType type, TemplateBase.CloseType ctype) -
createCompatibleTemplates
public static TemplateBase[] createCompatibleTemplates(TemplateBase.TemplateType type, TemplateBase.CloseType ctype) -
getCellType
-
getRowType
-
getAggOp
-
getOuterProductType
-
getLiteral
-
isLiteral
-
isLiteral
-
isLookup
-
isUnary
-
isUnaryRowAgg
-
isBinary
-
rIsSparseSafeOnly
-
rContainsInput
-
isTernary
-
createCNodeData
-
skipTranspose
-
findRemovableConditionalPatternInOuterProduct
-
skipConditionalInOuterProduct
-
hasTransposeParentUnderOuterProduct
-
hasSingleOperation
-
isValidSingleOperation
-
hasNoOperation
-
hasOnlyDataNodeOrLookupInputs
-
determineMinVectorIntermediates
-
isUnaryOperatorPipeline
-
getMaxVectorIntermediates
-
countVectorIntermediates
-
getMaxLiveVectorIntermediates
-
isValidNumVectorIntermediates
-
rIsValidNumVectorIntermediates
-
getAllParents
-
getAllParents
-
isType
public static boolean isType(TemplateBase.TemplateType type, TemplateBase.TemplateType... validTypes) -
hasCommonRowTemplateMatrixInput
-
getRowTemplateMatrixInput
-
containsBinary
-
rContainsBinary
-
containsOuterProduct
-
containsOuterProduct
-
rFlipVectorLookups
-
containsFusedRowVecAgg
-