Class TemplateUtils
- java.lang.Object
- 
- org.apache.sysds.hops.codegen.template.TemplateUtils
 
- 
 public class TemplateUtils extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description static TemplateBase[]TEMPLATES
 - 
Constructor SummaryConstructors Constructor Description TemplateUtils()
 - 
Method Summary
 
- 
- 
- 
Field Detail- 
TEMPLATESpublic static final TemplateBase[] TEMPLATES 
 
- 
 - 
Method Detail- 
isVectorpublic static boolean isVector(Hop hop) 
 - 
isColVectorpublic static boolean isColVector(Hop hop) 
 - 
isColVectorpublic static boolean isColVector(CNode hop) 
 - 
isRowVectorpublic static boolean isRowVector(CNode hop) 
 - 
isMatrixpublic static boolean isMatrix(CNode hop) 
 - 
wrapLookupIfNecessarypublic static CNode wrapLookupIfNecessary(CNode node, Hop hop, boolean rowTpl) 
 - 
isMatrixpublic static boolean isMatrix(Hop hop) 
 - 
isVectorOrScalarpublic static boolean isVectorOrScalar(Hop hop) 
 - 
isBinaryMatrixRowVectorpublic static boolean isBinaryMatrixRowVector(Hop hop) 
 - 
isBinaryMatrixColVectorpublic static boolean isBinaryMatrixColVector(Hop hop) 
 - 
hasMatrixInputpublic static boolean hasMatrixInput(Hop hop) 
 - 
isOperationSupportedpublic static boolean isOperationSupported(Hop h) 
 - 
createTemplatepublic static TemplateBase createTemplate(TemplateBase.TemplateType type) 
 - 
createTemplatepublic static TemplateBase createTemplate(TemplateBase.TemplateType type, TemplateBase.CloseType ctype) 
 - 
createCompatibleTemplatespublic static TemplateBase[] createCompatibleTemplates(TemplateBase.TemplateType type, TemplateBase.CloseType ctype) 
 - 
getCellTypepublic static SpoofCellwise.CellType getCellType(Hop hop) 
 - 
getRowTypepublic static SpoofRowwise.RowType getRowType(Hop output, Hop... inputs) 
 - 
getAggOppublic static Types.AggOp getAggOp(Hop hop) 
 - 
getOuterProductTypepublic static SpoofOuterProduct.OutProdType getOuterProductType(Hop X, Hop U, Hop V, Hop out) 
 - 
isLiteralpublic static boolean isLiteral(CNode node) 
 - 
isLookuppublic static boolean isLookup(CNode node, boolean includeRC1) 
 - 
isUnarypublic static boolean isUnary(CNode node, CNodeUnary.UnaryType... types) 
 - 
isUnaryRowAggpublic static boolean isUnaryRowAgg(CNode node) 
 - 
isBinarypublic static boolean isBinary(CNode node, CNodeBinary.BinType... types) 
 - 
rIsSparseSafeOnlypublic static boolean rIsSparseSafeOnly(CNode node, CNodeBinary.BinType... types) 
 - 
rContainsInputpublic static boolean rContainsInput(CNode node, long hopID) 
 - 
isTernarypublic static boolean isTernary(CNode node, CNodeTernary.TernaryType... types) 
 - 
skipTransposepublic static CNode skipTranspose(CNode cdataOrig, Hop hop, HashMap<Long,CNode> tmp, boolean compileLiterals) 
 - 
findRemovableConditionalPatternInOuterProductpublic static LinkedList<Long> findRemovableConditionalPatternInOuterProduct(Hop hop) 
 - 
skipConditionalInOuterProductpublic static long skipConditionalInOuterProduct(Hop hop, HashMap<Long,CNode> tmp, HashSet<Hop> inHops) 
 - 
hasTransposeParentUnderOuterProductpublic static boolean hasTransposeParentUnderOuterProduct(Hop hop) 
 - 
hasSingleOperationpublic static boolean hasSingleOperation(CNodeTpl tpl) 
 - 
isValidSingleOperationpublic static boolean isValidSingleOperation(Hop hop) 
 - 
hasNoOperationpublic static boolean hasNoOperation(CNodeTpl tpl) 
 - 
hasOnlyDataNodeOrLookupInputspublic static boolean hasOnlyDataNodeOrLookupInputs(CNode node) 
 - 
determineMinVectorIntermediatespublic static int determineMinVectorIntermediates(CNode node, CNode main) 
 - 
isUnaryOperatorPipelinepublic static boolean isUnaryOperatorPipeline(CNode node) 
 - 
getMaxVectorIntermediatespublic static int getMaxVectorIntermediates(CNode node) 
 - 
countVectorIntermediatespublic static int countVectorIntermediates(CNode node) 
 - 
getMaxLiveVectorIntermediatespublic static int getMaxLiveVectorIntermediates(CNode node, CNode main, Map<Long,Set<Long>> parents, Set<org.apache.commons.lang3.tuple.Pair<Long,Long>> stack) 
 - 
isValidNumVectorIntermediatespublic static boolean isValidNumVectorIntermediates(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) 
 - 
rIsValidNumVectorIntermediatespublic static boolean rIsValidNumVectorIntermediates(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) 
 - 
isTypepublic static boolean isType(TemplateBase.TemplateType type, TemplateBase.TemplateType... validTypes) 
 - 
hasCommonRowTemplateMatrixInputpublic static boolean hasCommonRowTemplateMatrixInput(Hop input1, Hop input2, CPlanMemoTable memo) 
 - 
getRowTemplateMatrixInputpublic static long getRowTemplateMatrixInput(Hop current, CPlanMemoTable memo) 
 - 
containsBinarypublic static boolean containsBinary(CNode node, CNodeBinary.BinType type) 
 - 
rContainsBinarypublic static boolean rContainsBinary(CNode node, CNodeBinary.BinType type) 
 - 
containsOuterProductpublic static boolean containsOuterProduct(Hop hop) 
 - 
rFlipVectorLookupspublic static void rFlipVectorLookups(CNode current) 
 - 
containsFusedRowVecAggpublic static boolean containsFusedRowVecAgg(CNodeTpl tpl) 
 
- 
 
-