Package org.apache.sysds.hops.estim
Class EstimatorBitsetMM
- java.lang.Object
- 
- org.apache.sysds.hops.estim.SparsityEstimator
- 
- org.apache.sysds.hops.estim.EstimatorBitsetMM
 
 
- 
 public class EstimatorBitsetMM extends SparsityEstimator This estimator implements a naive but rather common approach of boolean matrix multiplies which allows to infer the exact non-zero structure and thus is also useful for sparse result preallocation. For example, the following paper indicates that this approach is used for sparse spGEMM in NVIDIA cuSPARSE and Intel MKL: Weifeng Liu and Brian Vinter. An Efficient GPU General Sparse Matrix-Matrix Multiplication for Irregular Data. In IPDPS, pages 370–381, 2014.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classEstimatorBitsetMM.BitsetMatrixstatic classEstimatorBitsetMM.BitsetMatrix1This class represents a boolean matrix and provides key operations.static classEstimatorBitsetMM.BitsetMatrix2- 
Nested classes/interfaces inherited from class org.apache.sysds.hops.estim.SparsityEstimatorSparsityEstimator.OpCode
 
- 
 - 
Field Summary- 
Fields inherited from class org.apache.sysds.hops.estim.SparsityEstimatorMIN_PAR_THRESHOLD, MULTI_THREADED_BUILD, MULTI_THREADED_ESTIM
 
- 
 - 
Constructor SummaryConstructors Constructor Description EstimatorBitsetMM()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EstimatorBitsetMM.BitsetMatrixcreateBitset(int m, int n)static EstimatorBitsetMM.BitsetMatrixcreateBitset(MatrixBlock in)DataCharacteristicsestim(MMNode root)Estimates the output sparsity of a DAG of matrix multiplications for the given operator graph of a single root node.doubleestim(MatrixBlock m, SparsityEstimator.OpCode op)Estimates the output sparsity for a given unary operation.doubleestim(MatrixBlock m1, MatrixBlock m2)Estimates the output sparsity for a single matrix multiplication.doubleestim(MatrixBlock m1, MatrixBlock m2, SparsityEstimator.OpCode op)Estimates the output sparsity for a given binary operation.
 
- 
- 
- 
Method Detail- 
estimpublic DataCharacteristics estim(MMNode root) Description copied from class:SparsityEstimatorEstimates the output sparsity of a DAG of matrix multiplications for the given operator graph of a single root node.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- root- DAG root node
- Returns:
- output data characteristics
 
 - 
estimpublic double estim(MatrixBlock m1, MatrixBlock m2) Description copied from class:SparsityEstimatorEstimates the output sparsity for a single matrix multiplication.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- m1- left-hand-side operand
- m2- right-hand-side operand
- Returns:
- sparsity
 
 - 
estimpublic double estim(MatrixBlock m1, MatrixBlock m2, SparsityEstimator.OpCode op) Description copied from class:SparsityEstimatorEstimates the output sparsity for a given binary operation.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- m1- left-hand-side operand
- m2- right-hand-side operand
- op- operator code
- Returns:
- sparsity
 
 - 
estimpublic double estim(MatrixBlock m, SparsityEstimator.OpCode op) Description copied from class:SparsityEstimatorEstimates the output sparsity for a given unary operation.- Specified by:
- estimin class- SparsityEstimator
- Parameters:
- m- left-hand-side operand
- op- operator code
- Returns:
- sparsity
 
 - 
createBitsetpublic static EstimatorBitsetMM.BitsetMatrix createBitset(int m, int n) 
 - 
createBitsetpublic static EstimatorBitsetMM.BitsetMatrix createBitset(MatrixBlock in) 
 
- 
 
-