You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemml.apache.org by de...@apache.org on 2016/11/14 23:28:34 UTC
[1/5] incubator-systemml git commit: [SYSTEMML-842] Javadoc cleanup
in runtime compress and controlprogram packages
Repository: incubator-systemml
Updated Branches:
refs/heads/master ef37de6e1 -> 56e45f1a2
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
index d86d99f..ecccbec 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerRuleBased.java
@@ -136,8 +136,8 @@ import org.apache.sysml.yarn.ropt.YarnClusterAnalyzer;
*
* TODO fuse also result merge into fused data partitioning and execute
* (for writing the result directly from execute we need to partition
- * columns/rows according to blocksize -> rewrite (only applicable if
- * numCols/blocksize>numreducers)+custom MR partitioner)
+ * columns/rows according to blocksize -> rewrite (only applicable if
+ * numCols/blocksize>numreducers)+custom MR partitioner)
*
*
* TODO take remote memory into account in data/result partitioning rewrites (smaller/larger)
@@ -346,10 +346,6 @@ public class OptimizerRuleBased extends Optimizer
return true;
}
- /**
- *
- * @param pn
- */
protected void analyzeProblemAndInfrastructure( OptNode pn )
{
_N = Long.parseLong(pn.getParam(ParamType.NUM_ITERATIONS));
@@ -394,13 +390,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set data partitioner
///
-
- /**
- *
- * @param n
- * @param partitionedMatrices
- * @throws DMLRuntimeException
- */
+
protected boolean rewriteSetDataPartitioner(OptNode n, LocalVariableMap vars, HashMap<String, PDataPartitionFormat> partitionedMatrices )
throws DMLRuntimeException
{
@@ -457,14 +447,7 @@ public class OptimizerRuleBased extends Optimizer
return blockwise;
}
-
- /**
- *
- * @param n
- * @param cand
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean rFindDataPartitioningCandidates( OptNode n, HashMap<String, PDataPartitionFormat> cand, LocalVariableMap vars )
throws DMLRuntimeException
{
@@ -513,11 +496,12 @@ public class OptimizerRuleBased extends Optimizer
*
* NOTE: Using the dimensions without sparsity is a conservative worst-case consideration.
*
- * @param n
- * @param varName
- * @param dpf
- * @return
- * @throws DMLRuntimeException
+ * @param n internal representation of a plan alternative for program blocks and instructions
+ * @param varName variable name
+ * @param dpf data partition format
+ * @param vars local variable map
+ * @return memory estimate
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected double getNewRIXMemoryEstimate( OptNode n, String varName, PDataPartitionFormat dpf, LocalVariableMap vars )
throws DMLRuntimeException
@@ -551,26 +535,12 @@ public class OptimizerRuleBased extends Optimizer
return mem;
}
- /**
- *
- * @param mo
- * @param dpf
- * @return
- * @throws DMLRuntimeException
- */
protected static LopProperties.ExecType getRIXExecType( MatrixObject mo, PDataPartitionFormat dpf )
throws DMLRuntimeException
{
return getRIXExecType(mo, dpf, false);
}
-
- /**
- *
- * @param mo
- * @param dpf
- * @return
- * @throws DMLRuntimeException
- */
+
protected static LopProperties.ExecType getRIXExecType( MatrixObject mo, PDataPartitionFormat dpf, boolean withSparsity )
throws DMLRuntimeException
{
@@ -608,14 +578,7 @@ public class OptimizerRuleBased extends Optimizer
else
return LopProperties.ExecType.CP_FILE;
}
-
- /**
- *
- * @param mo
- * @param dpf
- * @return
- * @throws DMLRuntimeException
- */
+
public static PDataPartitionFormat decideBlockWisePartitioning( MatrixObject mo, PDataPartitionFormat dpf )
throws DMLRuntimeException
{
@@ -646,12 +609,7 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @return
- * @throws DMLRuntimeException
- */
+
public static boolean allowsBinaryCellPartitions( MatrixObject mo, PDataPartitionFormat dpf )
throws DMLRuntimeException
{
@@ -662,11 +620,6 @@ public class OptimizerRuleBased extends Optimizer
//REWRITE set result partitioning
///
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
protected boolean rewriteSetResultPartitioning(OptNode n, double M, LocalVariableMap vars)
throws DMLRuntimeException
{
@@ -702,16 +655,7 @@ public class OptimizerRuleBased extends Optimizer
return apply;
}
-
- /**
- *
- * @param nlist
- * @param resultVars
- * @param vars
- * @param iterVarname
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean isResultPartitionableAll( Collection<OptNode> nlist, ArrayList<String> resultVars, LocalVariableMap vars, String iterVarname )
throws DMLRuntimeException
{
@@ -725,16 +669,7 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @param n
- * @param resultVars
- * @param vars
- * @param iterVarname
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean isResultPartitionable( OptNode n, ArrayList<String> resultVars, LocalVariableMap vars, String iterVarname )
throws DMLRuntimeException
{
@@ -825,60 +760,30 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @param rows
- * @return
- */
+
private double estimateSizeSparseRowBlock( long rows ) {
//see MatrixBlock.estimateSizeSparseInMemory
return 44 + rows * 8;
}
-
- /**
- *
- * @param cols
- * @param nnz
- * @return
- */
+
private double estimateSizeSparseRow( long cols, long nnz ) {
//see MatrixBlock.estimateSizeSparseInMemory
long cnnz = Math.max(SparseRow.initialCapacity, Math.max(cols, nnz));
return ( 116 + 12 * cnnz ); //sparse row
}
-
- /**
- *
- * @param cols
- * @return
- */
+
private double estimateSizeSparseRowMin( long cols ) {
//see MatrixBlock.estimateSizeSparseInMemory
long cnnz = Math.min(SparseRow.initialCapacity, cols);
return ( 116 + 12 * cnnz ); //sparse row
}
-
- /**
- *
- * @param budget
- * @param rows
- * @return
- */
+
private int estimateNumTasksSparseCol( double budget, long rows ) {
//see MatrixBlock.estimateSizeSparseInMemory
double lbudget = budget - rows * 116;
return (int) Math.floor( lbudget / 12 );
}
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- * @throws HopsException
- * @throws LopsException
- * @throws IOException
- */
+
protected void recompileLIX( OptNode n, LocalVariableMap vars )
throws DMLRuntimeException, HopsException, LopsException, IOException
{
@@ -908,12 +813,7 @@ public class OptimizerRuleBased extends Optimizer
//set new mem estimate (last, otherwise overwritten from recompile)
h.setMemEstimate(_rm-1);
}
-
- /**
- *
- * @param parent
- * @return
- */
+
protected HashMap<Hop, Double> getPartitionedRIXEstimates(OptNode parent)
{
HashMap<Hop, Double> estimates = new HashMap<Hop, Double>();
@@ -925,12 +825,7 @@ public class OptimizerRuleBased extends Optimizer
}
return estimates;
}
-
- /**
- *
- * @param parent
- * @param estimates
- */
+
protected void resetPartitionRIXEstimates( HashMap<Hop, Double> estimates )
{
for( Entry<Hop, Double> e : estimates.entrySet() )
@@ -945,13 +840,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set execution strategy
///
-
- /**
- *
- * @param n
- * @param M
- * @throws DMLRuntimeException
- */
+
protected boolean rewriteSetExecutionStategy(OptNode n, double M0, double M, double M2, boolean flagLIX)
throws DMLRuntimeException
{
@@ -1024,25 +913,13 @@ public class OptimizerRuleBased extends Optimizer
return requiresRecompile;
}
-
- /**
- *
- * @param pn
- * @return
- */
+
protected boolean isLargeProblem(OptNode pn, double M0)
{
return ((_N >= PROB_SIZE_THRESHOLD_REMOTE || _Nmax >= 10 * PROB_SIZE_THRESHOLD_REMOTE )
&& M0 > PROB_SIZE_THRESHOLD_MB ); //original operations at least larger than 256MB
}
-
- /**
- *
- * @param n
- * @param memBudget
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean isCPOnlyPossible( OptNode n, double memBudget )
throws DMLRuntimeException
{
@@ -1074,13 +951,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set operations exec type
///
-
- /**
- *
- * @param pn
- * @param recompile
- * @throws DMLRuntimeException
- */
+
protected void rewriteSetOperationsExecType(OptNode pn, boolean recompile)
throws DMLRuntimeException
{
@@ -1098,13 +969,7 @@ public class OptimizerRuleBased extends Optimizer
//debug output
LOG.debug(getOptMode()+" OPT: rewrite 'set operation exec type CP' - result="+count);
}
-
- /**
- *
- * @param n
- * @param et
- * @return
- */
+
protected int setOperationExecType( OptNode n, ExecType et )
{
int count = 0;
@@ -1131,8 +996,9 @@ public class OptimizerRuleBased extends Optimizer
* NOTE: if MAX_REPLICATION_FACTOR_PARTITIONING is set larger than 10, co-location may
* throw warnings per split since this exceeds "max block locations"
*
- * @param n
- * @throws DMLRuntimeException
+ * @param n internal representation of a plan alternative for program blocks and instructions
+ * @param vars local variable map
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected void rewriteDataColocation( OptNode n, LocalVariableMap vars )
throws DMLRuntimeException
@@ -1175,15 +1041,7 @@ public class OptimizerRuleBased extends Optimizer
_numEvaluatedPlans++;
LOG.debug(getOptMode()+" OPT: rewrite 'enable data colocation' - result="+apply+((apply)?" ("+varname+")":"") );
}
-
- /**
- *
- * @param n
- * @param cand
- * @param iterVarname
- * @return
- * @throws DMLRuntimeException
- */
+
protected void rFindDataColocationCandidates( OptNode n, HashSet<String> cand, String iterVarname )
throws DMLRuntimeException
{
@@ -1231,9 +1089,11 @@ public class OptimizerRuleBased extends Optimizer
*
* NOTE: this rewrite requires 'set data partitioner' to be executed in order to
* leverage the partitioning information in the plan tree.
- *
- * @param n
- * @throws DMLRuntimeException
+ *
+ * @param n internal representation of a plan alternative for program blocks and instructions
+ * @param partitionedMatrices map of data partition formats
+ * @param vars local variable map
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected void rewriteSetPartitionReplicationFactor( OptNode n, HashMap<String, PDataPartitionFormat> partitionedMatrices, LocalVariableMap vars )
throws DMLRuntimeException
@@ -1301,10 +1161,10 @@ public class OptimizerRuleBased extends Optimizer
* matrices that are created as in-memory objects before parfor execution.
*
* NOTE: this rewrite requires 'set execution strategy' to be executed.
- *
- * @param n
- * @param partitionedMatrices
- * @throws DMLRuntimeException
+ *
+ * @param n internal representation of a plan alternative for program blocks and instructions
+ * @param vars local variable map
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected void rewriteSetExportReplicationFactor( OptNode n, LocalVariableMap vars )
throws DMLRuntimeException
@@ -1339,14 +1199,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE enable nested parallelism
///
-
- /**
- *
- * @param n
- * @param M
- * @return
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("all")
protected boolean rewriteNestedParallelism(OptNode n, double M, boolean flagLIX )
throws DMLRuntimeException
@@ -1412,16 +1265,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set degree of parallelism
///
-
- /**
- *
- * @param n
- * @param M
- * @param kMax
- * @param mMax (per node)
- * @param nested
- * @throws DMLRuntimeException
- */
+
protected void rewriteSetDegreeOfParallelism(OptNode n, double M, boolean flagNested)
throws DMLRuntimeException
{
@@ -1493,13 +1337,7 @@ public class OptimizerRuleBased extends Optimizer
_numEvaluatedPlans++;
LOG.debug(getOptMode()+" OPT: rewrite 'set degree of parallelism' - result=(see EXPLAIN)" );
}
-
- /**
- *
- * @param n
- * @param par
- * @throws DMLRuntimeException
- */
+
protected void rAssignRemainingParallelism(OptNode n, int parforK, int opsK)
throws DMLRuntimeException
{
@@ -1578,12 +1416,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set task partitioner
///
-
- /**
- *
- * @param n
- * @param partitioner
- */
+
protected void rewriteSetTaskPartitioner(OptNode pn, boolean flagNested, boolean flagLIX)
{
//assertions (warnings of corrupt optimizer decisions)
@@ -1621,13 +1454,7 @@ public class OptimizerRuleBased extends Optimizer
setTaskPartitioner( pn, PTaskPartitioner.NAIVE );
}
}
-
- /**
- *
- * @param n
- * @param partitioner
- * @param flagLIX
- */
+
protected void setTaskPartitioner( OptNode n, PTaskPartitioner partitioner )
{
long id = n.getID();
@@ -1676,13 +1503,12 @@ public class OptimizerRuleBased extends Optimizer
* (if we were not able to select REMOTE_MR as execution strategy wrt mapper budget)
* TODO modify 'set exec strategy' and related rewrites for conditional data partitioning.
*
- *
- * @param M
- * @param partitionedMatrices, ExecutionContext ec
- *
- * @param n
- * @param partitioner
- * @throws DMLRuntimeException
+ * @param pn internal representation of a plan alternative for program blocks and instructions
+ * @param M ?
+ * @param flagLIX ?
+ * @param partitionedMatrices map of data partition formats
+ * @param vars local variable map
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected void rewriteSetFusedDataPartitioningExecution(OptNode pn, double M, boolean flagLIX, HashMap<String, PDataPartitionFormat> partitionedMatrices, LocalVariableMap vars)
throws DMLRuntimeException
@@ -1736,14 +1562,7 @@ public class OptimizerRuleBased extends Optimizer
LOG.debug(getOptMode()+" OPT: rewrite 'set fused data partitioning and execution' - result="+apply );
}
-
- /**
- *
- * @param n
- * @param iterVarname
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean rIsAccessByIterationVariable( OptNode n, String varName, String iterVarname )
throws DMLRuntimeException
{
@@ -1820,14 +1639,7 @@ public class OptimizerRuleBased extends Optimizer
LOG.debug(getOptMode()+" OPT: rewrite 'set transpose sparse vector operations' - result="+apply );
}
-
- /**
- *
- * @param n
- * @param iterVarname
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean rIsTransposeSafePartition( OptNode n, String varName )
throws DMLRuntimeException
{
@@ -1862,15 +1674,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set in-place result indexing
///
-
- /**
- *
- * @param pn
- * @param M
- * @param vars
- * @param inPlaceResultVars
- * @throws DMLRuntimeException
- */
+
protected void rewriteSetInPlaceResultIndexing(OptNode pn, double M, LocalVariableMap vars, HashSet<String> inPlaceResultVars, ExecutionContext ec)
throws DMLRuntimeException
{
@@ -2622,14 +2426,7 @@ public class OptimizerRuleBased extends Optimizer
{
return listUIPRes.get();
}
-
- /**
- *
- * @param n
- * @param retVars
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean rHasOnlyInPlaceSafeLeftIndexing( OptNode n, ArrayList<String> retVars )
throws DMLRuntimeException
{
@@ -2653,13 +2450,7 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @param retVars
- * @param vars
- * @return
- */
+
private double computeTotalSizeResultVariables(ArrayList<String> retVars, LocalVariableMap vars, int k)
{
double sum = 1;
@@ -2687,14 +2478,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE disable CP caching
///
-
- /**
- *
- * @param pn
- * @param inplaceResultVars
- * @param vars
- * @throws DMLRuntimeException
- */
+
protected void rewriteDisableCPCaching(OptNode pn, HashSet<String> inplaceResultVars, LocalVariableMap vars)
throws DMLRuntimeException
{
@@ -2718,14 +2502,7 @@ public class OptimizerRuleBased extends Optimizer
LOG.debug(getOptMode()+" OPT: rewrite 'disable CP caching' - result="+apply+" (M="+toMB(M_sumInterm)+")" );
}
-
- /**
- *
- * @param n
- * @param inplaceResultVars
- * @return
- * @throws DMLRuntimeException
- */
+
protected double rComputeSumMemoryIntermediates( OptNode n, HashSet<String> inplaceResultVars,
HashMap <String, ArrayList <UIPCandidateHop>> uipCands )
throws DMLRuntimeException
@@ -2798,14 +2575,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE enable runtime piggybacking
///
-
- /**
- *
- * @param n
- * @param partitionedMatrices.keySet()
- * @param vars
- * @throws DMLRuntimeException
- */
+
protected void rewriteEnableRuntimePiggybacking( OptNode n, LocalVariableMap vars, HashMap<String, PDataPartitionFormat> partitionedMatrices )
throws DMLRuntimeException
{
@@ -2831,15 +2601,7 @@ public class OptimizerRuleBased extends Optimizer
LOG.debug(getOptMode()+" OPT: rewrite 'enable runtime piggybacking' - result="+apply+
" ("+ProgramConverter.serializeStringCollection(sharedVars)+")" );
}
-
- /**
- *
- * @param n
- * @param inputVars
- * @param partitionedVars
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean rHasSharedMRInput( OptNode n, Set<String> inputVars, Set<String> partitionedVars, HashSet<String> sharedVars )
throws DMLRuntimeException
{
@@ -2883,12 +2645,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE inject spark loop checkpointing
///
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected void rewriteInjectSparkLoopCheckpointing(OptNode n)
throws DMLRuntimeException
{
@@ -2925,12 +2682,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE inject spark repartition for zipmm
///
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected void rewriteInjectSparkRepartition(OptNode n, LocalVariableMap vars)
throws DMLRuntimeException
{
@@ -2978,12 +2730,7 @@ public class OptimizerRuleBased extends Optimizer
LOG.debug(getOptMode()+" OPT: rewrite 'inject spark input repartition' - result="+ret.size()+
" ("+ProgramConverter.serializeStringCollection(ret)+")" );
}
-
- /**
- *
- * @param n
- * @param cand
- */
+
private void rCollectZipmmPartitioningCandidates( OptNode n, HashSet<String> cand )
{
//collect zipmm inputs
@@ -3015,12 +2762,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set spark eager rdd caching
///
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected void rewriteSetSparkEagerRDDCaching(OptNode n, LocalVariableMap vars)
throws DMLRuntimeException
{
@@ -3071,13 +2813,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE remove compare matrix (for result merge, needs to be invoked before setting result merge)
///
-
- /**
- *
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected void rewriteRemoveUnnecessaryCompareMatrix( OptNode n, ExecutionContext ec )
throws DMLRuntimeException
{
@@ -3111,17 +2847,7 @@ public class OptimizerRuleBased extends Optimizer
_numEvaluatedPlans++;
LOG.debug(getOptMode()+" OPT: rewrite 'remove unnecessary compare matrix' - result="+(!cleanedVars.isEmpty())+" ("+ProgramConverter.serializeStringCollection(cleanedVars)+")" );
}
-
- /**
- *
- * @param n
- * @param resultVar
- * @param iterVarname
- * @param mo
- * @return
- * @throws DMLRuntimeException
- */
protected boolean rContainsResultFullReplace( OptNode n, String resultVar, String iterVarname, MatrixObject mo )
throws DMLRuntimeException
{
@@ -3139,16 +2865,7 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @param n
- * @param resultVar
- * @param iterVarname
- * @param mo
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean isResultFullReplace( OptNode n, String resultVar, String iterVarname, MatrixObject mo )
throws DMLRuntimeException
{
@@ -3187,13 +2904,7 @@ public class OptimizerRuleBased extends Optimizer
return false;
}
-
- /**
- *
- * @param n
- * @param var
- * @return
- */
+
protected boolean rIsReadInRightIndexing(OptNode n, String var)
{
//NOTE: This method checks if a given variables is used in right indexing
@@ -3222,13 +2933,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE set result merge
///
-
- /**
- *
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected void rewriteSetResultMerge( OptNode n, LocalVariableMap vars, boolean inLocal )
throws DMLRuntimeException
{
@@ -3284,13 +2989,7 @@ public class OptimizerRuleBased extends Optimizer
_numEvaluatedPlans++;
LOG.debug(getOptMode()+" OPT: rewrite 'set result merge' - result="+ret );
}
-
- /**
- *
- * @param resultVars
- * @param vars
- * @return
- */
+
protected boolean determineFlagCellFormatWoCompare( ArrayList<String> resultVars, LocalVariableMap vars )
{
boolean ret = true;
@@ -3320,14 +3019,7 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @param n
- * @param resultVars
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean hasResultMRLeftIndexing( OptNode n, ArrayList<String> resultVars, LocalVariableMap vars, boolean checkSize )
throws DMLRuntimeException
{
@@ -3369,12 +3061,12 @@ public class OptimizerRuleBased extends Optimizer
/**
* Heuristically compute total result sizes, if larger than local mem budget assumed to be large.
*
- * @param n
- * @param resultVars
- * @param vars
- * @param checkSize
- * @return
- * @throws DMLRuntimeException
+ * @param pn internal representation of a plan alternative for program blocks and instructions
+ * @param resultVars list of result variables
+ * @param vars local variable map
+ * @param checkSize ?
+ * @return true if result sizes larger than local memory budget
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected boolean hasLargeTotalResults( OptNode pn, ArrayList<String> resultVars, LocalVariableMap vars, boolean checkSize )
throws DMLRuntimeException
@@ -3412,14 +3104,7 @@ public class OptimizerRuleBased extends Optimizer
return ( totalSize >= _lm ); //heuristic: large if >= local mem budget
}
-
- /**
- *
- * @param tp
- * @param N
- * @param k
- * @return
- */
+
protected long estimateNumTasks( PTaskPartitioner tp, long N, int k )
{
long W = -1;
@@ -3437,15 +3122,7 @@ public class OptimizerRuleBased extends Optimizer
return W;
}
-
- /**
- *
- * @param n
- * @param resultVars
- * @param vars
- * @return
- * @throws DMLRuntimeException
- */
+
protected boolean hasOnlyInMemoryResults( OptNode n, ArrayList<String> resultVars, LocalVariableMap vars, boolean inLocal )
throws DMLRuntimeException
{
@@ -3480,13 +3157,7 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @param nodes
- * @param vars
- * @throws DMLRuntimeException
- */
+
protected void rInvokeSetResultMerge( Collection<OptNode> nodes, LocalVariableMap vars, boolean inLocal)
throws DMLRuntimeException
{
@@ -3500,13 +3171,7 @@ public class OptimizerRuleBased extends Optimizer
else if( n.getChilds()!=null )
rInvokeSetResultMerge(n.getChilds(), vars, inLocal);
}
-
- /**
- *
- * @param rows
- * @param cols
- * @return
- */
+
public static boolean isInMemoryResultMerge( long rows, long cols, double memBudget )
{
if( !ParForProgramBlock.USE_PARALLEL_RESULT_MERGE )
@@ -3523,11 +3188,6 @@ public class OptimizerRuleBased extends Optimizer
//REWRITE set recompile memory budget
///
- /**
- *
- * @param n
- * @param M
- */
protected void rewriteSetRecompileMemoryBudget( OptNode n )
{
double newLocalMem = _lm;
@@ -3553,12 +3213,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE remove recursive parfor
///
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected void rewriteRemoveRecursiveParFor(OptNode n, LocalVariableMap vars)
throws DMLRuntimeException
{
@@ -3590,14 +3245,7 @@ public class OptimizerRuleBased extends Optimizer
_numEvaluatedPlans++;
LOG.debug(getOptMode()+" OPT: rewrite 'remove recursive parfor' - result="+recPBs.size()+"/"+count );
}
-
- /**
- *
- * @param n
- * @param cand
- * @param recContext
- * @return
- */
+
protected void rFindRecursiveParFor( OptNode n, HashSet<ParForProgramBlock> cand, boolean recContext )
{
//recursive invocation
@@ -3618,16 +3266,7 @@ public class OptimizerRuleBased extends Optimizer
cand.add(pfpb);
}
}
-
- /**
- *
- * @param n
- * @param parfor
- * @param recPBs
- * @throws DMLRuntimeException
- * @throws HopsException
- * @throws LanguageException
- */
+
protected void rFindAndUnfoldRecursiveFunction( OptNode n, ParForProgramBlock parfor, HashSet<ParForProgramBlock> recPBs, LocalVariableMap vars )
throws DMLRuntimeException, HopsException, LanguageException
{
@@ -3691,13 +3330,7 @@ public class OptimizerRuleBased extends Optimizer
for( OptNode c : n.getChilds() )
rFindAndUnfoldRecursiveFunction(c, parfor, recPBs, vars);
}
-
- /**
- *
- * @param n
- * @param parfor
- * @return
- */
+
protected boolean rContainsNode( OptNode n, ParForProgramBlock parfor )
{
boolean ret = false;
@@ -3717,13 +3350,7 @@ public class OptimizerRuleBased extends Optimizer
return ret;
}
-
- /**
- *
- * @param n
- * @param pbs
- * @return
- */
+
protected HashSet<ParForProgramBlock> rGetAllParForPBs( OptNode n, HashSet<ParForProgramBlock> pbs )
{
//collect parfor
@@ -3741,15 +3368,7 @@ public class OptimizerRuleBased extends Optimizer
return pbs;
}
-
- /**
- *
- * @param n
- * @param oldName
- * @param newName
- * @throws DMLRuntimeException
- * @throws HopsException
- */
+
protected void rReplaceFunctionNames( OptNode n, String oldName, String newName )
throws DMLRuntimeException, HopsException
{
@@ -3792,14 +3411,7 @@ public class OptimizerRuleBased extends Optimizer
for( OptNode c : n.getChilds() )
rReplaceFunctionNames(c, oldName, newName);
}
-
- /**
- *
- * @param n
- * @param recPBs
- * @return
- * @throws DMLRuntimeException
- */
+
protected int removeRecursiveParFor( OptNode n, HashSet<ParForProgramBlock> recPBs )
throws DMLRuntimeException
{
@@ -3846,12 +3458,7 @@ public class OptimizerRuleBased extends Optimizer
///////
//REWRITE remove unnecessary parfor
///
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected void rewriteRemoveUnnecessaryParFor(OptNode n)
throws DMLRuntimeException
{
@@ -3860,13 +3467,7 @@ public class OptimizerRuleBased extends Optimizer
_numEvaluatedPlans++;
LOG.debug(getOptMode()+" OPT: rewrite 'remove unnecessary parfor' - result="+count );
}
-
- /**
- *
- * @param n
- * @return
- * @throws DMLRuntimeException
- */
+
protected int removeUnnecessaryParFor( OptNode n )
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestMemoryObserver.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestMemoryObserver.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestMemoryObserver.java
index d052647..0f8a8bf 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestMemoryObserver.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestMemoryObserver.java
@@ -45,30 +45,20 @@ public class PerfTestMemoryObserver implements Runnable
_maxMem = -1;
_stopped = false;
}
-
- /**
- *
- */
+
public void measureStartMem()
{
forceGC();
_startMem = Runtime.getRuntime().totalMemory()
- Runtime.getRuntime().freeMemory();
}
-
- /**
- *
- * @return
- */
+
public long getMaxMemConsumption()
{
long val = _maxMem - _startMem;
return (val < 0) ? 0 : val;
}
-
- /**
- *
- */
+
public void setStopped()
{
_stopped = true;
@@ -95,22 +85,14 @@ public class PerfTestMemoryObserver implements Runnable
throw new RuntimeException("Error measuring Java memory usage", ex);
}
}
-
- /**
- *
- * @return
- */
+
public static double getUsedMemory()
{
forceGC();
return ( Runtime.getRuntime().totalMemory()
- Runtime.getRuntime().freeMemory() );
}
-
- /**
- *
- * @param force
- */
+
private static void forceGC()
{
//request gc until weak reference is eliminated by gc
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
index 6d571ea..3049b94 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/PerfTestTool.java
@@ -248,10 +248,6 @@ public class PerfTestTool
}
}
- /**
- *
- * @throws DMLRuntimeException
- */
public static void lazyInit()
throws DMLRuntimeException
{
@@ -277,12 +273,6 @@ public class PerfTestTool
throw new DMLRuntimeException("Performance test results have not been loaded completely.");
}
- /**
- *
- * @param opStr
- * @return
- * @throws DMLRuntimeException
- */
public static boolean isRegisteredInstruction(String opStr)
throws DMLRuntimeException
{
@@ -292,13 +282,7 @@ public class PerfTestTool
//determine if inst registered
return _regInst_NamesID.containsKey(opStr);
}
-
- /**
- *
- * @param instName
- * @return
- * @throws DMLRuntimeException
- */
+
public static CostFunction getCostFunction( String instName, TestMeasure measure, TestVariable variable, DataFormat dataformat )
throws DMLRuntimeException
{
@@ -314,24 +298,13 @@ public class PerfTestTool
}
return tmp;
}
-
- /**
- *
- * @param measure
- * @param variable
- * @param dataformat
- * @return
- */
+
public CostFunction getInvariantCostFunction( TestMeasure measure, TestVariable[] variable, DataFormat dataformat )
{
//TODO: implement for additional rewrites
throw new RuntimeException("Not implemented yet.");
}
- /**
- *
- * @return
- */
@SuppressWarnings("all")
public static boolean runTest()
{
@@ -376,9 +349,6 @@ public class PerfTestTool
return ret;
}
- /**
- *
- */
private static void registerTestConfigurations()
{
//reset ID Sequence for consistent IDs
@@ -424,11 +394,7 @@ public class PerfTestTool
_defaultConf = defaultConf;
//_MRConf = mrConf;
}
-
- /**
- *
- * @throws DMLRuntimeException
- */
+
private static void registerInstructions()
throws DMLRuntimeException
{
@@ -516,12 +482,7 @@ public class PerfTestTool
return mrinst;
}
*/
-
- /**
- *
- * @param def
- * @return
- */
+
private static int registerTestDef( PerfTestDef def )
{
int ID = (int)_seqTestDef.getNextID();
@@ -530,30 +491,13 @@ public class PerfTestTool
return ID;
}
-
- /**
- *
- * @param iname
- * @param inst
- * @param testDefIDs
- * @param vectors
- * @param schema
- */
+
private static void registerInstruction( String iname, Instruction inst, Integer[] testDefIDs, boolean vectors, IOSchema schema )
{
int ID = (int)_seqInst.getNextID();
registerInstruction(ID, iname, inst, testDefIDs, vectors, schema);
}
-
- /**
- *
- * @param ID
- * @param iname
- * @param inst
- * @param testDefIDs
- * @param vector
- * @param schema
- */
+
private static void registerInstruction( int ID, String iname, Instruction inst, Integer[] testDefIDs, boolean vector, IOSchema schema )
{
_regInst.put( ID, inst );
@@ -564,14 +508,6 @@ public class PerfTestTool
_regInst_IDIOSchema.put( ID, schema );
}
- /**
- *
- * @param instID
- * @param measure
- * @param variable
- * @param dataformat
- * @return
- */
private static int getMappedTestDefID( int instID, TestMeasure measure, TestVariable variable, DataFormat dataformat )
{
int ret = -1;
@@ -590,29 +526,13 @@ public class PerfTestTool
return ret;
}
-
- /**
- *
- * @param measure
- * @param lvariable
- * @param dataformat
- * @param pvariable
- * @return
- */
+
@SuppressWarnings("unused")
private static int getTestDefID( TestMeasure measure, TestVariable lvariable, DataFormat dataformat, InternalTestVariable pvariable )
{
return getTestDefID(measure, lvariable, dataformat, new InternalTestVariable[]{pvariable});
}
-
- /**
- *
- * @param measure
- * @param lvariable
- * @param dataformat
- * @param pvariables
- * @return
- */
+
private static int getTestDefID( TestMeasure measure, TestVariable lvariable, DataFormat dataformat, InternalTestVariable[] pvariables )
{
int ret = -1;
@@ -642,42 +562,23 @@ public class PerfTestTool
return ret;
}
- /**
- *
- * @param instName
- * @return
- */
private static int getInstructionID( String instName )
{
Integer ret = _regInst_NamesID.get( instName );
return ( ret!=null )? ret : -1;
}
- /**
- *
- * @return
- */
@SuppressWarnings("unused")
private static Integer[] getAllTestDefs()
{
return _regTestDef.keySet().toArray(new Integer[0]);
}
-
- /**
- *
- * @return
- */
+
private static Integer[] getDefaultTestDefs()
{
return _defaultConf;
}
-
- /**
- *
- * @param v
- * @param IDs
- * @return
- */
+
@SuppressWarnings("unused")
private static Integer[] changeToMuliDimTestDefs( TestVariable v, Integer[] IDs )
{
@@ -712,12 +613,7 @@ public class PerfTestTool
return tmp;
}
-
- /**
- *
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private static void executeTest( )
throws DMLRuntimeException, IOException
{
@@ -810,21 +706,7 @@ public class PerfTestTool
}
}
}
-
- /**
- *
- * @param m
- * @param v
- * @param df
- * @param varValue
- * @param pb
- * @param vectors
- * @param schema
- *
- * @return
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private static double executeTestCase1D( TestMeasure m, InternalTestVariable v, DataFormat df, double varValue, ProgramBlock pb, boolean vectors, IOSchema schema, ExecutionContext ec )
throws DMLRuntimeException, IOException
{
@@ -935,19 +817,7 @@ public class PerfTestTool
return value;
}
-
- /**
- *
- * @param m
- * @param v
- * @param df
- * @param varValue
- * @param pb
- * @param schema
- * @return
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private static double executeTestCaseMD( TestMeasure m, InternalTestVariable[] v, DataFormat df, double[] varValue, ProgramBlock pb, IOSchema schema, ExecutionContext ec )
throws DMLRuntimeException, IOException
{
@@ -1006,14 +876,7 @@ public class PerfTestTool
return value;
}
-
- /**
- *
- * @param measure
- * @param pb
- * @return
- * @throws DMLRuntimeException
- */
+
public static double executeGenericProgramBlock( TestMeasure measure, ProgramBlock pb, ExecutionContext ec )
throws DMLRuntimeException
{
@@ -1056,13 +919,6 @@ public class PerfTestTool
return value;
}
- /**
- *
- * @param min
- * @param max
- * @param num
- * @return
- */
public static LinkedList<Double> generateSequence( double min, double max, double num )
{
LinkedList<Double> data = new LinkedList<Double>();
@@ -1073,17 +929,7 @@ public class PerfTestTool
return data;
}
-
- /**
- *
- * @param fname
- * @param datasize
- * @param sparsity
- * @param df
- * @return
- * @throws IOException
- * @throws CacheException
- */
+
public static MatrixObject generateInputDataset(String fname, double datasize, double sparsity, DataFormat df)
throws IOException, CacheException
{
@@ -1121,18 +967,7 @@ public class PerfTestTool
return mo;
}
-
- /**
- *
- * @param fname
- * @param dim1
- * @param dim2
- * @param sparsity
- * @param df
- * @return
- * @throws IOException
- * @throws CacheException
- */
+
public static MatrixObject generateInputDataset(String fname, double dim1, double dim2, double sparsity, DataFormat df)
throws IOException, CacheException
{
@@ -1173,16 +1008,7 @@ public class PerfTestTool
return mo;
}
-
- /**
- *
- * @param fname
- * @param datasize
- * @param df
- * @return
- * @throws IOException
- * @throws CacheException
- */
+
public static MatrixObject generateEmptyResult(String fname, double datasize, DataFormat df )
throws IOException, CacheException
{
@@ -1206,17 +1032,7 @@ public class PerfTestTool
return mo;
}
-
- /**
- *
- * @param fname
- * @param dim1
- * @param dim2
- * @param df
- * @return
- * @throws IOException
- * @throws CacheException
- */
+
public static MatrixObject generateEmptyResult(String fname, double dim1, double dim2, DataFormat df )
throws IOException, CacheException
{
@@ -1246,6 +1062,14 @@ public class PerfTestTool
/**
* NOTE: This is a copy of TestUtils.generateTestMatrix, it was replicated in order to prevent
* dependency of SystemML.jar to our test package.
+ *
+ * @param rows number of rows
+ * @param cols number of columns
+ * @param min minimum value
+ * @param max maximum value
+ * @param sparsity sparsity as a percentage
+ * @param seed random seed value (-1 if use System time)
+ * @return matrix as 2D double array
*/
public static double[][] generateTestMatrix(int rows, int cols, double min, double max, double sparsity, long seed) {
double[][] matrix = new double[rows][cols];
@@ -1266,14 +1090,6 @@ public class PerfTestTool
return matrix;
}
-
- /**
- *
- * @param fname
- * @throws DMLRuntimeException
- * @throws XMLStreamException
- * @throws IOException
- */
public static void externalReadProfile( String fname )
throws DMLRuntimeException, XMLStreamException, IOException
{
@@ -1287,13 +1103,6 @@ public class PerfTestTool
readProfile( fname );
}
- /**
- *
- * @param dirname
- * @return
- * @throws IOException
- * @throws DMLRuntimeException
- */
@SuppressWarnings("all")
private static HashMap<Integer,Long> writeResults( String dirname )
throws IOException, DMLRuntimeException
@@ -1421,19 +1230,7 @@ public class PerfTestTool
return map;
}
-
- /**
- *
- * @param dmlname
- * @param dmltmpname
- * @param dir
- * @param models
- * @param rows
- * @param cols
- * @throws IOException
- * @throws ParseException
- * @throws DMLException
- */
+
private static void computeRegressionModels( String dmlname, String dmltmpname, String dir, int models, int rows, int cols )
throws IOException, ParseException, DMLException
{
@@ -1481,13 +1278,7 @@ public class PerfTestTool
// execute DML script
DMLScript.main(new String[] { "-f", dmltmpname });
}
-
- /**
- *
- * @param dname
- * @param IDMapping
- * @throws IOException
- */
+
private static void readRegressionModels( String dname, HashMap<Integer,Long> IDMapping )
throws IOException
{
@@ -1527,11 +1318,6 @@ public class PerfTestTool
}
}
- /**
- *
- * @param vars
- * @return
- */
private static String serializeTestVariables( InternalTestVariable[] vars )
{
StringBuilder sb = new StringBuilder();
@@ -1543,12 +1329,7 @@ public class PerfTestTool
}
return sb.toString();
}
-
- /**
- *
- * @param vars
- * @return
- */
+
private static InternalTestVariable[] parseTestVariables(String vars)
{
StringTokenizer st = new StringTokenizer(vars, XML_ELEMENT_DELIMITER);
@@ -1557,12 +1338,7 @@ public class PerfTestTool
v[i] = InternalTestVariable.valueOf(st.nextToken());
return v;
}
-
- /**
- *
- * @param vals
- * @return
- */
+
private static String serializeParams( double[] vals )
{
StringBuilder sb = new StringBuilder();
@@ -1574,12 +1350,7 @@ public class PerfTestTool
}
return sb.toString();
}
-
- /**
- *
- * @param valStr
- * @return
- */
+
private static double[] parseParams( String valStr )
{
StringTokenizer st = new StringTokenizer(valStr, XML_ELEMENT_DELIMITER);
@@ -1588,13 +1359,7 @@ public class PerfTestTool
params[i] = Double.parseDouble(st.nextToken());
return params;
}
-
- /**
- *
- * @param fname
- * @throws XMLStreamException
- * @throws IOException
- */
+
private static void readProfile( String fname )
throws XMLStreamException, IOException
{
@@ -1661,8 +1426,10 @@ public class PerfTestTool
/**
* StAX for efficient streaming XML writing.
*
- * @throws IOException
- * @throws XMLStreamException
+ * @param dname directory name
+ * @param fname file name
+ * @throws IOException if IOException occurs
+ * @throws XMLStreamException if XMLStreamException occurs
*/
private static void writeProfile( String dname, String fname )
throws IOException, XMLStreamException
@@ -1734,7 +1501,7 @@ public class PerfTestTool
/**
* Main for invoking the actual performance test in order to produce profile.xml
*
- * @param args
+ * @param args string arguments to main() method
*/
public static void main(String[] args)
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
index 8844dc6..ef2d880 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/ProgramRecompiler.java
@@ -60,22 +60,8 @@ import org.apache.sysml.runtime.instructions.cp.Data;
import org.apache.sysml.runtime.instructions.cp.FunctionCallCPInstruction;
import org.apache.sysml.runtime.instructions.cp.ScalarObject;
-/**
- *
- */
public class ProgramRecompiler
{
-
- /**
- *
- * @param rtprog
- * @param sbs
- * @return
- * @throws IOException
- * @throws DMLRuntimeException
- * @throws LopsException
- * @throws HopsException
- */
public static ArrayList<ProgramBlock> generatePartitialRuntimeProgram(Program rtprog, ArrayList<StatementBlock> sbs)
throws LopsException, DMLRuntimeException, IOException, HopsException
{
@@ -103,12 +89,12 @@ public class ProgramRecompiler
* otherwise, we release the forced exec type and recompile again. Hence,
* any changes can be exactly reverted with the same access behavior.
*
- * @param sb
- * @param pb
- * @param var
- * @param ec
- * @param force
- * @throws DMLRuntimeException
+ * @param sb statement block
+ * @param pb program block
+ * @param var variable
+ * @param ec execution context
+ * @param force if true, set and recompile the respective indexing hops
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static void rFindAndRecompileIndexingHOP( StatementBlock sb, ProgramBlock pb, String var, ExecutionContext ec, boolean force )
throws DMLRuntimeException
@@ -212,15 +198,7 @@ public class ProgramRecompiler
}
}
}
-
- /**
- *
- * @param prog
- * @param parforSB
- * @param vars
- * @return
- * @throws DMLRuntimeException
- */
+
public static LocalVariableMap getReusableScalarVariables( DMLProgram prog, StatementBlock parforSB, LocalVariableMap vars )
throws DMLRuntimeException
{
@@ -282,13 +260,7 @@ public class ProgramRecompiler
}
}
}
-
- /**
- *
- * @param pred
- * @param vars
- * @throws DMLRuntimeException
- */
+
private static void replacePredicateLiterals( Hop pred, LocalVariableMap vars )
throws DMLRuntimeException
{
@@ -304,11 +276,11 @@ public class ProgramRecompiler
* In case of invariant variables we can reuse partitioned matrices and propagate constants
* for better size estimation.
*
- * @param prog
- * @param parforSB
- * @param var
- * @return
- * @throws DMLRuntimeException
+ * @param prog dml program
+ * @param parforSB parfor statement block
+ * @param var variable
+ * @return true if can reuse variable
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static boolean isApplicableForReuseVariable( DMLProgram prog, StatementBlock parforSB, String var )
throws DMLRuntimeException
@@ -320,14 +292,7 @@ public class ProgramRecompiler
return ret;
}
-
- /**
- *
- * @param sb
- * @param parforSB
- * @param var
- * @throws DMLRuntimeException
- */
+
private static boolean isApplicableForReuseVariable( StatementBlock sb, StatementBlock parforSB, String var )
throws DMLRuntimeException
{
@@ -363,12 +328,7 @@ public class ProgramRecompiler
return ret && !sb.variablesUpdated().containsVariable(var);
}
-
- /**
- *
- * @param pb
- * @return
- */
+
public static boolean containsAtLeastOneFunction( ProgramBlock pb )
{
if( pb instanceof IfProgramBlock )
@@ -405,15 +365,7 @@ public class ProgramRecompiler
return false;
}
-
- /**
- *
- * @param hop
- * @param in
- * @param force
- * @return
- * @throws DMLRuntimeException
- */
+
private static ArrayList<Instruction> rFindAndRecompileIndexingHOP( Hop hop, ArrayList<Instruction> in, String var, ExecutionContext ec, boolean force )
throws DMLRuntimeException
{
@@ -443,14 +395,7 @@ public class ProgramRecompiler
return tmp;
}
-
-
- /**
- *
- * @param hop
- * @param var
- * @return
- */
+
private static boolean rFindAndSetCPIndexingHOP(Hop hop, String var)
{
boolean ret = false;
@@ -520,14 +465,7 @@ public class ProgramRecompiler
///////
// additional general-purpose functionalities
-
- /**
- *
- * @param iterVar
- * @param offset
- * @return
- * @throws DMLRuntimeException
- */
+
protected static ArrayList<Instruction> createNestedParallelismToInstructionSet(String iterVar, String offset)
throws DMLRuntimeException
{
@@ -555,12 +493,7 @@ public class ProgramRecompiler
/////////////////////////////////
// experimental functionality
//////////
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
protected static void recompilePartialPlan( OptNode n )
throws DMLRuntimeException
{
@@ -610,9 +543,9 @@ public class ProgramRecompiler
* NOTE: need to recompile complete programblock because (1) many to many relationships
* between hops and instructions and (2) due to changed internal variable names
*
- * @param n
- * @return
- * @throws DMLRuntimeException
+ * @param n internal representation of a plan alternative for program blocks and instructions
+ * @return program block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected static ProgramBlock recompile( OptNode n )
throws DMLRuntimeException
@@ -678,13 +611,6 @@ public class ProgramRecompiler
return pbNew;
}
-
- /**
- *
- * @param hlNodeID
- * @param pbNew
- * @throws DMLRuntimeException
- */
protected static void exchangeProgram(long hlNodeID, ProgramBlock pbNew)
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/InfrastructureAnalyzer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/InfrastructureAnalyzer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/InfrastructureAnalyzer.java
index 75c96ba..d5f8c7d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/InfrastructureAnalyzer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/InfrastructureAnalyzer.java
@@ -65,11 +65,7 @@ public class InfrastructureAnalyzer
//analyze remote Hadoop cluster properties
//analyzeHadoopCluster(); //note: due to overhead - analyze on-demand
}
-
- /**
- *
- * @return
- */
+
public static boolean isJavaVersionLessThanJDK8()
{
return _isLtJDK8;
@@ -82,7 +78,7 @@ public class InfrastructureAnalyzer
* Gets the number of logical processors of the current node,
* including hyper-threading if enabled.
*
- * @return
+ * @return number of local processors of the current node
*/
public static int getLocalParallelism()
{
@@ -93,7 +89,7 @@ public class InfrastructureAnalyzer
* Gets the number of cluster nodes (number of tasktrackers). If multiple tasktracker
* are started per node, each tasktracker is viewed as individual node.
*
- * @return
+ * @return number of cluster nodes
*/
public static int getRemoteParallelNodes()
{
@@ -104,9 +100,9 @@ public class InfrastructureAnalyzer
}
/**
- * Gets the total number of available map slots.
+ * Gets the number of remote parallel map slots.
*
- * @return
+ * @return number of remote parallel map tasks
*/
public static int getRemoteParallelMapTasks()
{
@@ -115,20 +111,16 @@ public class InfrastructureAnalyzer
return _remoteParMap;
}
-
- /**
- *
- * @param pmap
- */
+
public static void setRemoteParallelMapTasks(int pmap)
{
_remoteParMap = pmap;
}
/**
- * Gets the total number of available reduce slots.
+ * Gets the total number of remote parallel reduce slots.
*
- * @return
+ * @return number of remote parallel reduce tasks
*/
public static int getRemoteParallelReduceTasks()
{
@@ -137,11 +129,7 @@ public class InfrastructureAnalyzer
return _remoteParReduce;
}
-
- /**
- *
- * @param preduce
- */
+
public static void setRemoteParallelReduceTasks(int preduce)
{
_remoteParReduce = preduce;
@@ -150,7 +138,7 @@ public class InfrastructureAnalyzer
/**
* Gets the totals number of available map and reduce slots.
*
- * @return
+ * @return number of available remote parallel task slots
*/
public static int getRemoteParallelTasks()
{
@@ -167,17 +155,13 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum memory [in bytes] of the current JVM.
*
- * @return
+ * @return maximum memory of the current JVM
*/
public static long getLocalMaxMemory()
{
return _localJVMMaxMem;
}
-
- /**
- *
- * @param localMem
- */
+
public static void setLocalMaxMemory( long localMem )
{
_localJVMMaxMem = localMem;
@@ -186,7 +170,7 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum memory [in bytes] of a hadoop map task JVM.
*
- * @return
+ * @return maximum memory of remote hadoop map task jvm
*/
public static long getRemoteMaxMemoryMap()
{
@@ -195,11 +179,7 @@ public class InfrastructureAnalyzer
return _remoteJVMMaxMemMap;
}
-
- /**
- *
- * @param remoteMem
- */
+
public static void setRemoteMaxMemoryMap( long remoteMem )
{
_remoteJVMMaxMemMap = remoteMem;
@@ -208,7 +188,7 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum memory [in bytes] of a hadoop reduce task JVM.
*
- * @return
+ * @return maximum memory of remote hadoop reduce task jvm
*/
public static long getRemoteMaxMemoryReduce()
{
@@ -217,11 +197,7 @@ public class InfrastructureAnalyzer
return _remoteJVMMaxMemReduce;
}
-
- /**
- *
- * @param remoteMem
- */
+
public static void setRemoteMaxMemoryReduce( long remoteMem )
{
_remoteJVMMaxMemReduce = remoteMem;
@@ -230,8 +206,8 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum memory requirement [in bytes] of a given hadoop job.
*
- * @param conf
- * @return
+ * @param job job configuration
+ * @return remote max memory of hadoop job
*/
public static long getRemoteMaxMemory( JobConf job )
{
@@ -243,7 +219,7 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum sort buffer memory requirement [in bytes] of a hadoop task.
*
- * @return
+ * @return maximum sort buffer memory of hadoop task
*/
public static long getRemoteMaxMemorySortBuffer( )
{
@@ -279,7 +255,7 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum local parallelism constraint.
*
- * @return
+ * @return maximum local parallelism constraint
*/
public static int getCkMaxCP()
{
@@ -290,7 +266,7 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum remote parallelism constraint
*
- * @return
+ * @return maximum remote parallelism constraint
*/
public static int getCkMaxMR()
{
@@ -301,7 +277,7 @@ public class InfrastructureAnalyzer
/**
* Gets the maximum memory constraint [in bytes].
*
- * @return
+ * @return maximum memory constraint
*/
public static long getCmMax()
{
@@ -312,7 +288,7 @@ public class InfrastructureAnalyzer
/**
* Gets the HDFS blocksize of the used cluster in bytes.
*
- * @return
+ * @return HDFS block size
*/
public static long getHDFSBlockSize()
{
@@ -321,12 +297,7 @@ public class InfrastructureAnalyzer
return _blocksize;
}
-
- /**
- *
- * @return
- */
public static boolean isYarnEnabled()
{
if( _remoteJVMMaxMemMap == -1 )
@@ -334,13 +305,7 @@ public class InfrastructureAnalyzer
return _yarnEnabled;
}
-
-
- /**
- *
- * @param javaOpts
- * @return
- */
+
public static long extractMaxMemoryOpt(String javaOpts)
{
long ret = -1; //mem in bytes
@@ -371,13 +336,7 @@ public class InfrastructureAnalyzer
return ret;
}
-
- /**
- *
- * @param job
- * @param key
- * @param bytes
- */
+
public static void setMaxMemoryOpt(JobConf job, String key, long bytes)
{
String javaOptsOld = job.get( key );
@@ -410,8 +369,9 @@ public class InfrastructureAnalyzer
* NOTE: on YARN the number of slots is a spurious indicator
* because containers are purely scheduled based on memory.
*
- * @return
- * @throws IOException
+ * @param mapOnly if true, only look at map tasks
+ * @return cluster utilization (current / capacity)
+ * @throws IOException if IOException occurs
*/
public static double getClusterUtilization(boolean mapOnly)
throws IOException
@@ -523,12 +483,7 @@ public class InfrastructureAnalyzer
//analyze if local mode (internally requires yarn_enabled)
_localJT = analyzeLocalMode(job);
}
-
- /**
- *
- * @param job
- * @return
- */
+
private static boolean analyzeLocalMode(JobConf job)
{
//analyze if local mode (if yarn enabled, we always assume cluster mode
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/StatisticMonitor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/StatisticMonitor.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/StatisticMonitor.java
index 410d793..2547709 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/StatisticMonitor.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/StatisticMonitor.java
@@ -55,8 +55,8 @@ public class StatisticMonitor
* Register information about parent-child relationships of parworkers and
* parfor program blocks, with a parfor can be related to one or many parworkers.
*
- * @param pfid
- * @param pwid
+ * @param pfid ?
+ * @param pwid ?
*/
public static void putPfPwMapping( long pfid, long pwid )
{
@@ -69,9 +69,9 @@ public class StatisticMonitor
/**
* Puts a specific parfor statistic for future analysis into the repository.
*
- * @param id
- * @param type
- * @param s
+ * @param id ?
+ * @param type parfor statistic type
+ * @param s ?
*/
public static void putPFStat( long id, Stat type, double s)
{
@@ -95,9 +95,9 @@ public class StatisticMonitor
/**
* Puts a specific parworker statistic for future analysis into the repository.
*
- * @param id
- * @param type
- * @param s
+ * @param id ?
+ * @param type parfor statistic type
+ * @param s ?
*/
public static void putPWStat( long id, Stat type, double s)
{
@@ -143,7 +143,7 @@ public class StatisticMonitor
*
* NOTE: This report is mainly for analysis and debugging purposes.
*
- * @return
+ * @return report as string
*/
public static String createReport()
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/Timing.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/Timing.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/Timing.java
index b1c8db2..b0b8075 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/Timing.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/stat/Timing.java
@@ -54,7 +54,7 @@ public class Timing
* Measures and returns the time since the last start() or stop() invocation and
* restarts the measurement.
*
- * @return
+ * @return duration between start and stop
*/
public double stop()
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
index c6284fb..95edfa3 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/IDHandler.java
@@ -34,12 +34,6 @@ import java.net.InetAddress;
public class IDHandler
{
-
- /**
- *
- * @param taskID
- * @return
- */
public static long extractUncheckedLongID( String taskID )
{
//in: e.g., task_local_0002_m_000009 or jobID + ...
@@ -64,11 +58,6 @@ public class IDHandler
return value;
}
- /**
- *
- * @param taskID
- * @return
- */
public static int extractIntID( String taskID )
{
int maxlen = (int)(Math.log10(Integer.MAX_VALUE));
@@ -76,25 +65,14 @@ public class IDHandler
return intVal;
}
-
- /**
- *
- * @param taskID
- * @return
- */
+
public static long extractLongID( String taskID )
{
int maxlen = (int)(Math.log10(Long.MAX_VALUE));
long longVal = extractID( taskID, maxlen );
return longVal;
}
-
- /**
- *
- * @param part1
- * @param part2
- * @return
- */
+
public static long concatIntIDsToLong( int part1, int part2 )
{
//big-endian version (in java uses only big endian)
@@ -107,11 +85,13 @@ public class IDHandler
return value;
}
-
+
/**
+ * Extract int ID from long value
*
- * @param part 1 for first 4 bytes, 2 for second 4 bytes
- * @return
+ * @param val long value
+ * @param part if part is 1, use first 4 bytes. if part is 2, use second 4 bytes!
+ * @return return int id, or -1 if part is not 1 or 2!
*/
public static int extractIntIDFromLong( long val, int part )
{
@@ -125,9 +105,9 @@ public class IDHandler
}
/**
- * Creates a unique identifier with the pattern <process_id>_<host_ip>.
+ * Creates a unique identifier with the pattern <process_id>_<host_ip>.
*
- * @return
+ * @return distributed unique id
*/
public static String createDistributedUniqueID()
{
@@ -154,12 +134,6 @@ public class IDHandler
return uuid;
}
- /**
- *
- * @param taskID
- * @param maxlen
- * @return
- */
private static long extractID( String taskID, int maxlen )
{
//in: e.g., task_local_0002_m_000009 or task_201203111647_0898_m_000001
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/StagingFileUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/StagingFileUtils.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/StagingFileUtils.java
index 4541119..391c75f 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/StagingFileUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/util/StagingFileUtils.java
@@ -38,13 +38,7 @@ public class StagingFileUtils
{
public static final int CELL_BUFFER_SIZE = 100000;
-
- /**
- *
- * @param fname
- * @param buffer
- * @throws IOException
- */
+
public static void writeCellListToLocal( String fname, LinkedList<Cell> buffer )
throws IOException
{
@@ -164,13 +158,7 @@ public class StagingFileUtils
if( in != null )
in.close();
}
-
- /**
- *
- * @param fname
- * @return
- * @throws IOException
- */
+
public static LinkedList<Cell> readCellListFromLocal( String fname )
throws IOException
{
[3/5] incubator-systemml git commit: [SYSTEMML-842] Javadoc cleanup
in runtime compress and controlprogram packages
Posted by de...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java b/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
index 27655bf..9b2d650 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/context/SparkExecutionContext.java
@@ -124,7 +124,7 @@ public class SparkExecutionContext extends ExecutionContext
* Returns the used singleton spark context. In case of lazy spark context
* creation, this methods blocks until the spark context is created.
*
- * @return
+ * @return java spark context
*/
public JavaSparkContext getSparkContext()
{
@@ -137,11 +137,7 @@ public class SparkExecutionContext extends ExecutionContext
//return the created spark context
return _spctx;
}
-
- /**
- *
- * @return
- */
+
public static JavaSparkContext getSparkContextStatic() {
initSparkContext();
return _spctx;
@@ -151,22 +147,16 @@ public class SparkExecutionContext extends ExecutionContext
* Indicates if the spark context has been created or has
* been passed in from outside.
*
- * @return
+ * @return true if spark context created
*/
public synchronized static boolean isSparkContextCreated() {
return (_spctx != null);
}
-
- /**
- *
- */
+
public static void resetSparkContextStatic() {
_spctx = null;
}
-
- /**
- *
- */
+
public void close()
{
synchronized( SparkExecutionContext.class ) {
@@ -185,10 +175,7 @@ public class SparkExecutionContext extends ExecutionContext
public static boolean isLazySparkContextCreation(){
return LAZY_SPARKCTX_CREATION;
}
-
- /**
- *
- */
+
private synchronized static void initSparkContext()
{
//check for redundant spark context init
@@ -255,7 +242,7 @@ public class SparkExecutionContext extends ExecutionContext
* Sets up a SystemML-preferred Spark configuration based on the implicit
* default configuration (as passed via configurations from outside).
*
- * @return
+ * @return spark configuration
*/
public static SparkConf createSystemMLSparkConf() {
SparkConf conf = new SparkConf();
@@ -282,9 +269,9 @@ public class SparkExecutionContext extends ExecutionContext
* Spark instructions should call this for all matrix inputs except broadcast
* variables.
*
- * @param varname
- * @return
- * @throws DMLRuntimeException
+ * @param varname varible name
+ * @return JavaPairRDD of MatrixIndexes-MatrixBlocks
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unchecked")
public JavaPairRDD<MatrixIndexes,MatrixBlock> getBinaryBlockRDDHandleForVariable( String varname )
@@ -297,9 +284,9 @@ public class SparkExecutionContext extends ExecutionContext
* Spark instructions should call this for all frame inputs except broadcast
* variables.
*
- * @param varname
- * @return
- * @throws DMLRuntimeException
+ * @param varname variable name
+ * @return JavaPairRDD of Longs-FrameBlocks
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unchecked")
public JavaPairRDD<Long,FrameBlock> getFrameBinaryBlockRDDHandleForVariable( String varname )
@@ -308,14 +295,7 @@ public class SparkExecutionContext extends ExecutionContext
JavaPairRDD<Long,FrameBlock> out = (JavaPairRDD<Long,FrameBlock>) getRDDHandleForVariable( varname, InputInfo.BinaryBlockInputInfo);
return out;
}
-
- /**
- *
- * @param varname
- * @param inputInfo
- * @return
- * @throws DMLRuntimeException
- */
+
public JavaPairRDD<?,?> getRDDHandleForVariable( String varname, InputInfo inputInfo )
throws DMLRuntimeException
{
@@ -337,10 +317,10 @@ public class SparkExecutionContext extends ExecutionContext
* This call returns an RDD handle for a given matrix object. This includes
* the creation of RDDs for in-memory or binary-block HDFS data.
*
- *
- * @param varname
- * @return
- * @throws DMLRuntimeException
+ * @param mo matrix object
+ * @param inputInfo input info
+ * @return JavaPairRDD handle for a matrix object
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unchecked")
public JavaPairRDD<?,?> getRDDHandleForMatrixObject( MatrixObject mo, InputInfo inputInfo )
@@ -422,10 +402,10 @@ public class SparkExecutionContext extends ExecutionContext
* FIXME: currently this implementation assumes matrix representations but frame signature
* in order to support the old transform implementation.
*
- * @param mo
- * @param inputInfo
- * @return
- * @throws DMLRuntimeException
+ * @param fo frame object
+ * @param inputInfo input info
+ * @return JavaPairRDD handle for a frame object
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unchecked")
public JavaPairRDD<?,?> getRDDHandleForFrameObject( FrameObject fo, InputInfo inputInfo )
@@ -511,9 +491,9 @@ public class SparkExecutionContext extends ExecutionContext
* However, in order to handle this, we need to keep track when broadcast
* variables are no longer required.
*
- * @param varname
- * @return
- * @throws DMLRuntimeException
+ * @param varname variable name
+ * @return wrapper for broadcast variables
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unchecked")
public PartitionedBroadcast<MatrixBlock> getBroadcastForVariable( String varname )
@@ -575,14 +555,6 @@ public class SparkExecutionContext extends ExecutionContext
return bret;
}
-
- /**
- *
- * @param varname
- * @return
- * @throws DMLRuntimeException
- */
-
@SuppressWarnings("unchecked")
public PartitionedBroadcast<FrameBlock> getBroadcastForFrameVariable( String varname)
throws DMLRuntimeException
@@ -642,15 +614,7 @@ public class SparkExecutionContext extends ExecutionContext
return bret;
}
-
-
- /**
- *
- * @param varname
- * @return
- * @throws DMLRuntimeException
- */
public BlockPartitioner getPartitionerForRDDVariable(String varname)
throws DMLRuntimeException
{
@@ -666,9 +630,9 @@ public class SparkExecutionContext extends ExecutionContext
* Keep the output rdd of spark rdd operations as meta data of matrix/frame
* objects in the symbol table.
*
- * @param varname
- * @param rdd
- * @throws DMLRuntimeException
+ * @param varname variable name
+ * @param rdd JavaPairRDD handle for variable
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void setRDDHandleForVariable(String varname, JavaPairRDD<?,?> rdd)
throws DMLRuntimeException
@@ -681,10 +645,12 @@ public class SparkExecutionContext extends ExecutionContext
/**
* Utility method for creating an RDD out of an in-memory matrix block.
*
- * @param sc
- * @param block
- * @return
- * @throws DMLRuntimeException
+ * @param sc java spark context
+ * @param src matrix block
+ * @param brlen block row length
+ * @param bclen block column length
+ * @return JavaPairRDD handle to matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static JavaPairRDD<MatrixIndexes,MatrixBlock> toMatrixJavaPairRDD(JavaSparkContext sc, MatrixBlock src, int brlen, int bclen)
throws DMLRuntimeException
@@ -731,14 +697,7 @@ public class SparkExecutionContext extends ExecutionContext
return result;
}
-
- /**
- *
- * @param sc
- * @param src
- * @return
- * @throws DMLRuntimeException
- */
+
public static JavaPairRDD<Long,FrameBlock> toFrameJavaPairRDD(JavaSparkContext sc, FrameBlock src)
throws DMLRuntimeException
{
@@ -774,13 +733,15 @@ public class SparkExecutionContext extends ExecutionContext
/**
* This method is a generic abstraction for calls from the buffer pool.
- * See toMatrixBlock(JavaPairRDD<MatrixIndexes,MatrixBlock> rdd, int numRows, int numCols);
*
- * @param rdd
- * @param numRows
- * @param numCols
- * @return
- * @throws DMLRuntimeException
+ * @param rdd rdd object
+ * @param rlen number of rows
+ * @param clen number of columns
+ * @param brlen number of rows in a block
+ * @param bclen number of columns in a block
+ * @param nnz number of non-zeros
+ * @return matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unchecked")
public static MatrixBlock toMatrixBlock(RDDObject rdd, int rlen, int clen, int brlen, int bclen, long nnz)
@@ -798,11 +759,14 @@ public class SparkExecutionContext extends ExecutionContext
* NOTE: This is an unguarded utility function, which requires memory for both the output matrix
* and its collected, blocked representation.
*
- * @param rdd
- * @param numRows
- * @param numCols
- * @return
- * @throws DMLRuntimeException
+ * @param rdd JavaPairRDD for matrix block
+ * @param rlen number of rows
+ * @param clen number of columns
+ * @param brlen number of rows in a block
+ * @param bclen number of columns in a block
+ * @param nnz number of non-zeros
+ * @return matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static MatrixBlock toMatrixBlock(JavaPairRDD<MatrixIndexes,MatrixBlock> rdd, int rlen, int clen, int brlen, int bclen, long nnz)
throws DMLRuntimeException
@@ -887,12 +851,12 @@ public class SparkExecutionContext extends ExecutionContext
* Utility method for creating a single matrix block out of a binary cell RDD.
* Note that this collect call might trigger execution of any pending transformations.
*
- * @param rdd
- * @param rlen
- * @param clen
- * @param nnz
- * @return
- * @throws DMLRuntimeException
+ * @param rdd JavaPairRDD for matrix block
+ * @param rlen number of rows
+ * @param clen number of columns
+ * @param nnz number of non-zeros
+ * @return matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static MatrixBlock toMatrixBlock(JavaPairRDD<MatrixIndexes, MatrixCell> rdd, int rlen, int clen, long nnz)
throws DMLRuntimeException
@@ -935,18 +899,7 @@ public class SparkExecutionContext extends ExecutionContext
return out;
}
-
- /**
- *
- * @param rdd
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @param nnz
- * @return
- * @throws DMLRuntimeException
- */
+
public static PartitionedBlock<MatrixBlock> toPartitionedMatrixBlock(JavaPairRDD<MatrixIndexes,MatrixBlock> rdd, int rlen, int clen, int brlen, int bclen, long nnz)
throws DMLRuntimeException
{
@@ -973,15 +926,6 @@ public class SparkExecutionContext extends ExecutionContext
return out;
}
- /**
- *
- * @param rdd
- * @param schema
- * @param rlen
- * @param clen
- * @return
- * @throws DMLRuntimeException
- */
@SuppressWarnings("unchecked")
public static FrameBlock toFrameBlock(RDDObject rdd, ValueType[] schema, int rlen, int clen)
throws DMLRuntimeException
@@ -989,16 +933,7 @@ public class SparkExecutionContext extends ExecutionContext
JavaPairRDD<Long,FrameBlock> lrdd = (JavaPairRDD<Long,FrameBlock>) rdd.getRDD();
return toFrameBlock(lrdd, schema, rlen, clen);
}
-
- /**
- *
- * @param rdd
- * @param schema
- * @param rlen
- * @param clen
- * @return
- * @throws DMLRuntimeException
- */
+
public static FrameBlock toFrameBlock(JavaPairRDD<Long,FrameBlock> rdd, ValueType[] schema, int rlen, int clen)
throws DMLRuntimeException
{
@@ -1035,12 +970,7 @@ public class SparkExecutionContext extends ExecutionContext
return out;
}
-
- /**
- *
- * @param rdd
- * @param oinfo
- */
+
@SuppressWarnings("unchecked")
public static long writeRDDtoHDFS( RDDObject rdd, String path, OutputInfo oinfo )
{
@@ -1058,12 +988,7 @@ public class SparkExecutionContext extends ExecutionContext
//return nnz aggregate of all blocks
return nnz;
}
-
- /**
- *
- * @param rdd
- * @param oinfo
- */
+
@SuppressWarnings("unchecked")
public static void writeFrameRDDtoHDFS( RDDObject rdd, String path, OutputInfo oinfo )
{
@@ -1090,9 +1015,9 @@ public class SparkExecutionContext extends ExecutionContext
/**
* Adds a child rdd object to the lineage of a parent rdd.
*
- * @param varParent
- * @param varChild
- * @throws DMLRuntimeException
+ * @param varParent parent variable
+ * @param varChild child variable
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void addLineageRDD(String varParent, String varChild)
throws DMLRuntimeException
@@ -1106,9 +1031,9 @@ public class SparkExecutionContext extends ExecutionContext
/**
* Adds a child broadcast object to the lineage of a parent rdd.
*
- * @param varParent
- * @param varChild
- * @throws DMLRuntimeException
+ * @param varParent parent variable
+ * @param varChild child variable
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void addLineageBroadcast(String varParent, String varChild)
throws DMLRuntimeException
@@ -1118,14 +1043,7 @@ public class SparkExecutionContext extends ExecutionContext
parent.addLineageChild( child );
}
-
- /**
- *
- * @param varParent
- * @param varChild
- * @param broadcast
- * @throws DMLRuntimeException
- */
+
public void addLineage(String varParent, String varChild, boolean broadcast)
throws DMLRuntimeException
{
@@ -1180,12 +1098,7 @@ public class SparkExecutionContext extends ExecutionContext
throw new DMLRuntimeException(ex);
}
}
-
- /**
- *
- * @param lob
- * @throws IOException
- */
+
@SuppressWarnings({ "rawtypes", "unchecked" })
private void rCleanupLineageObject(LineageObject lob)
throws IOException
@@ -1227,8 +1140,7 @@ public class SparkExecutionContext extends ExecutionContext
* Hence, it is intended to be used on rmvar only. Depending on the
* ASYNCHRONOUS_VAR_DESTROY configuration, this is asynchronous or not.
*
- *
- * @param inV
+ * @param bvar broadcast variable
*/
public void cleanupBroadcastVariable(Broadcast<?> bvar)
{
@@ -1244,7 +1156,7 @@ public class SparkExecutionContext extends ExecutionContext
* Hence, it is intended to be used on rmvar only. Depending on the
* ASYNCHRONOUS_VAR_DESTROY configuration, this is asynchronous or not.
*
- * @param rvar
+ * @param rvar rdd variable to remove
*/
public void cleanupRDDVariable(JavaPairRDD<?,?> rvar)
{
@@ -1252,12 +1164,7 @@ public class SparkExecutionContext extends ExecutionContext
rvar.unpersist( ASYNCHRONOUS_VAR_DESTROY );
}
}
-
- /**
- *
- * @param var
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("unchecked")
public void repartitionAndCacheMatrixObject( String var )
throws DMLRuntimeException
@@ -1305,12 +1212,7 @@ public class SparkExecutionContext extends ExecutionContext
outro.addLineageChild(inro); //keep lineage to prevent cycles on cleanup
mo.setRDDHandle(outro);
}
-
- /**
- *
- * @param var
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("unchecked")
public void cacheMatrixObject( String var )
throws DMLRuntimeException
@@ -1330,43 +1232,26 @@ public class SparkExecutionContext extends ExecutionContext
if( !isRDDCached(in.id()) )
in.count(); //trigger caching to prevent contention
}
-
- /**
- *
- * @param poolName
- */
+
public void setThreadLocalSchedulerPool(String poolName) {
if( FAIR_SCHEDULER_MODE ) {
getSparkContext().sc().setLocalProperty(
"spark.scheduler.pool", poolName);
}
}
-
- /**
- *
- */
+
public void cleanupThreadLocalSchedulerPool() {
if( FAIR_SCHEDULER_MODE ) {
getSparkContext().sc().setLocalProperty(
"spark.scheduler.pool", null);
}
}
-
- /**
- *
- * @param rddID
- * @return
- */
+
private boolean isRDDMarkedForCaching( int rddID ) {
JavaSparkContext jsc = getSparkContext();
return jsc.sc().getPersistentRDDs().contains(rddID);
}
-
- /**
- *
- * @param rddID
- * @return
- */
+
private boolean isRDDCached( int rddID ) {
//check that rdd is marked for caching
JavaSparkContext jsc = getSparkContext();
@@ -1387,12 +1272,6 @@ public class SparkExecutionContext extends ExecutionContext
// Debug String Handling (see explain); TODO to be removed
///////
- /**
- *
- * @param inst
- * @param outputVarName
- * @throws DMLRuntimeException
- */
public void setDebugString(SPInstruction inst, String outputVarName)
throws DMLRuntimeException
{
@@ -1513,7 +1392,7 @@ public class SparkExecutionContext extends ExecutionContext
/**
* Obtains the lazily analyzed spark cluster configuration.
*
- * @return
+ * @return spark cluster configuration
*/
public static SparkClusterConfig getSparkClusterConfig() {
//lazy creation of spark cluster config
@@ -1525,7 +1404,7 @@ public class SparkExecutionContext extends ExecutionContext
/**
* Obtains the available memory budget for broadcast variables in bytes.
*
- * @return
+ * @return broadcast memory budget
*/
public static double getBroadcastMemoryBudget() {
return getSparkClusterConfig()
@@ -1537,7 +1416,7 @@ public class SparkExecutionContext extends ExecutionContext
*
* @param min flag for minimum data budget
* @param refresh flag for refresh with spark context
- * @return
+ * @return data memory budget
*/
public static double getDataMemoryBudget(boolean min, boolean refresh) {
return getSparkClusterConfig()
@@ -1547,7 +1426,7 @@ public class SparkExecutionContext extends ExecutionContext
/**
* Obtain the number of executors in the cluster (excluding the driver).
*
- * @return
+ * @return number of executors
*/
public static int getNumExecutors() {
return getSparkClusterConfig()
@@ -1558,16 +1437,13 @@ public class SparkExecutionContext extends ExecutionContext
* Obtain the default degree of parallelism (cores in the cluster).
*
* @param refresh flag for refresh with spark context
- * @return
+ * @return default degree of parallelism
*/
public static int getDefaultParallelism(boolean refresh) {
return getSparkClusterConfig()
.getDefaultParallelism(refresh);
}
-
- /**
- *
- */
+
public void checkAndRaiseValidationWarningJDKVersion()
{
//check for jdk version less than jdk8
@@ -1643,21 +1519,11 @@ public class SparkExecutionContext extends ExecutionContext
if( LOG.isDebugEnabled() )
LOG.debug( this.toString() );
}
-
- /**
- *
- * @return
- */
+
public long getBroadcastMemoryBudget() {
return (long) (_memExecutor * _memBroadcastFrac);
}
-
- /**
- *
- * @param min
- * @param refresh
- * @return
- */
+
public long getDataMemoryBudget(boolean min, boolean refresh) {
//always get the current num executors on refresh because this might
//change if not all executors are initially allocated and it is plan-relevant
@@ -1672,21 +1538,12 @@ public class SparkExecutionContext extends ExecutionContext
(min ? _memDataMinFrac : _memDataMaxFrac) );
}
- /**
- *
- * @return
- */
public int getNumExecutors() {
if( _numExecutors < 0 )
analyzeSparkParallelismConfiguation(null);
return _numExecutors;
}
-
- /**
- *
- * @param refresh
- * @return
- */
+
public int getDefaultParallelism(boolean refresh) {
if( _defaultPar < 0 && !refresh )
analyzeSparkParallelismConfiguation(null);
@@ -1697,10 +1554,6 @@ public class SparkExecutionContext extends ExecutionContext
getSparkContextStatic().defaultParallelism() : _defaultPar;
}
- /**
- *
- * @param conf
- */
public void analyzeSparkConfiguationLegacy(SparkConf conf) {
//ensure allocated spark conf
SparkConf sconf = (conf == null) ? createSystemMLSparkConf() : conf;
@@ -1718,11 +1571,7 @@ public class SparkExecutionContext extends ExecutionContext
//analyze spark degree of parallelism
analyzeSparkParallelismConfiguation(sconf);
}
-
- /**
- *
- * @param conf
- */
+
public void analyzeSparkConfiguation(SparkConf conf) {
//ensure allocated spark conf
SparkConf sconf = (conf == null) ? createSystemMLSparkConf() : conf;
@@ -1740,11 +1589,7 @@ public class SparkExecutionContext extends ExecutionContext
//analyze spark degree of parallelism
analyzeSparkParallelismConfiguation(sconf);
}
-
- /**
- *
- * @param sconf
- */
+
private void analyzeSparkParallelismConfiguation(SparkConf sconf) {
int numExecutors = sconf.getInt("spark.executor.instances", -1);
int numCoresPerExec = sconf.getInt("spark.executor.cores", -1);
@@ -1771,7 +1616,7 @@ public class SparkExecutionContext extends ExecutionContext
* we simply get it from the context; otherwise, we use Spark internal
* constants to avoid creating the spark context just for the version.
*
- * @return
+ * @return spark version string
*/
private String getSparkVersionString() {
//check for existing spark context
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitioner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitioner.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitioner.java
index ca49493..ab76b55 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitioner.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitioner.java
@@ -62,30 +62,13 @@ public abstract class DataPartitioner
_format = dpf;
_n = n;
}
-
-
-
- /**
- *
- * @param in
- * @param fnameNew
- * @return
- * @throws DMLRuntimeException
- */
+
public MatrixObject createPartitionedMatrixObject( MatrixObject in, String fnameNew )
throws DMLRuntimeException
{
return createPartitionedMatrixObject(in, fnameNew, false);
}
-
- /**
- *
- * @param in
- * @param fnameNew
- * @param force
- * @return
- * @throws DMLRuntimeException
- */
+
public MatrixObject createPartitionedMatrixObject( MatrixObject in, String fnameNew, boolean force )
throws DMLRuntimeException
{
@@ -106,10 +89,11 @@ public abstract class DataPartitioner
* created matrix object can be used transparently for obtaining the full matrix
* or reading 1 or multiple partitions based on given index ranges.
*
- * @param in
- * @param force
- * @return
- * @throws DMLRuntimeException
+ * @param in input matrix object
+ * @param out output matrix object
+ * @param force if false, try to optimize
+ * @return partitioned matrix object
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MatrixObject createPartitionedMatrixObject( MatrixObject in, MatrixObject out, boolean force )
throws DMLRuntimeException
@@ -190,27 +174,12 @@ public abstract class DataPartitioner
return out;
}
-
- /**
- *
- */
+
public void disableBinaryCell()
{
_allowBinarycell = false;
}
-
- /**
- *
- * @param fname
- * @param fnameNew
- * @param ii
- * @param oi
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- */
+
protected abstract void partitionMatrix( MatrixObject in, String fnameNew, InputInfo ii, OutputInfo oi, long rlen, long clen, int brlen, int bclen )
throws DMLRuntimeException;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
index 72cf976..8fcef65 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerLocal.java
@@ -86,11 +86,12 @@ public class DataPartitionerLocal extends DataPartitioner
private int _par = -1;
/**
+ * DataPartitionerLocal constructor.
*
- * @param dpf
- * @param n
+ * @param dpf data partitionformat
+ * @param n ?
* @param par -1 for serial otherwise number of threads, can be ignored by implementation
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public DataPartitionerLocal(PDataPartitionFormat dpf, int n, int par)
throws DMLRuntimeException
@@ -133,18 +134,6 @@ public class DataPartitionerLocal extends DataPartitioner
LocalFileUtils.cleanupWorkingDirectory(fnameStaging);
}
-
-
-
- /**
- *
- * @param fname
- * @param fnameStaging
- * @param fnameNew
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- */
private void partitionTextCell( String fname, String fnameStaging, String fnameNew, long rlen, long clen, int brlen, int bclen )
throws DMLRuntimeException
{
@@ -239,15 +228,6 @@ public class DataPartitionerLocal extends DataPartitioner
}
}
- /**
- *
- * @param fname
- * @param fnameStaging
- * @param fnameNew
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- */
@SuppressWarnings("deprecation")
private void partitionBinaryCell( String fname, String fnameStaging, String fnameNew, long rlen, long clen, int brlen, int bclen )
throws DMLRuntimeException
@@ -337,16 +317,7 @@ public class DataPartitionerLocal extends DataPartitioner
throw new DMLRuntimeException("Unable to partition binary cell matrix.", e);
}
}
-
- /**
- *
- * @param fname
- * @param fnameStaging
- * @param fnameNew
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("deprecation")
private void partitionBinaryBlock( String fname, String fnameStaging, String fnameNew, long rlen, long clen, int brlen, int bclen )
throws DMLRuntimeException
@@ -425,15 +396,6 @@ public class DataPartitionerLocal extends DataPartitioner
}
}
- /**
- *
- * @param fname
- * @param fnameStaging
- * @param fnameNew
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- */
@SuppressWarnings("deprecation")
private void partitionBinaryBlock2BinaryCell( String fname, String fnameStaging, String fnameNew, long rlen, long clen, int brlen, int bclen )
throws DMLRuntimeException
@@ -541,18 +503,6 @@ public class DataPartitionerLocal extends DataPartitioner
}
}
-
- /**
- *
- * @param dir
- * @param mb
- * @param row_offset
- * @param col_offset
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- * @throws IOException
- */
private void appendBlockToStagingArea( String dir, MatrixBlock mb, long row_offset, long col_offset, long brlen, long bclen )
throws DMLRuntimeException, IOException
{
@@ -602,16 +552,7 @@ public class DataPartitionerLocal extends DataPartitioner
LocalFileUtils.writeMatrixBlockToLocal(pfname, mb);
}
}
-
- /**
- *
- * @param dir
- * @param buffer
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private void appendCellBufferToStagingArea( String dir, LinkedList<Cell> buffer, int brlen, int bclen )
throws DMLRuntimeException, IOException
{
@@ -775,24 +716,14 @@ public class DataPartitionerLocal extends DataPartitioner
// Helper methods for local fs //
// read/write //
/////////////////////////////////
-
- /**
- *
- * @param dir
- * @return
- */
+
private long getKeyFromFilePath( String dir )
{
String[] dirparts = dir.split("/");
long key = Long.parseLong( dirparts[dirparts.length-1] );
return key;
}
-
- /**
- *
- * @param fname
- * @return
- */
+
private long getKey2FromFileName( String fname )
{
return Long.parseLong( fname.split("_")[1] );
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteMapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteMapper.java
index a339915..6fcfc1a 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteMapper.java
@@ -56,10 +56,7 @@ public class DataPartitionerRemoteMapper
{
}
-
- /**
- *
- */
+
@Override
public void map(Writable key, Writable value, OutputCollector<Writable, Writable> out, Reporter reporter)
throws IOException
@@ -67,9 +64,6 @@ public class DataPartitionerRemoteMapper
_mapper.processKeyValue(key, value, out, reporter);
}
- /**
- *
- */
@Override
public void configure(JobConf job)
{
@@ -102,10 +96,7 @@ public class DataPartitionerRemoteMapper
else
throw new RuntimeException("Unable to configure mapper with unknown input info: "+ii.toString());
}
-
- /**
- *
- */
+
@Override
public void close()
throws IOException
@@ -407,10 +398,7 @@ public class DataPartitionerRemoteMapper
}
}
}
-
- /**
- *
- */
+
private class DataPartitionerMapperBinaryblock2Binarycell extends DataPartitionerMapper
{
private JobConf _cachedJobConf = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteReducer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteReducer.java
index 0293299..8a9ddce 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteReducer.java
@@ -69,9 +69,6 @@ public class DataPartitionerRemoteReducer
_reducer.processKeyValueList(key, valueList, out, reporter);
}
- /**
- *
- */
public void configure(JobConf job)
{
String fnameNew = MRJobConfiguration.getPartitioningFilename( job );
@@ -86,10 +83,7 @@ public class DataPartitionerRemoteReducer
else
throw new RuntimeException("Unable to configure reducer with unknown output info: "+oi.toString());
}
-
- /**
- *
- */
+
@Override
public void close() throws IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSpark.java
index 9736e69..41fb235 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSpark.java
@@ -96,16 +96,7 @@ public class DataPartitionerRemoteSpark extends DataPartitioner
Statistics.maintainCPHeavyHitters(jobname, System.nanoTime()-t0);
}
}
-
- /**
- *
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @param numRed
- * @return
- */
+
private long determineNumReducers(long rlen, long clen, int brlen, int bclen, long numRed)
{
//set the number of mappers and reducers
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
index 334094d..8caac98 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/DataPartitionerRemoteSparkReducer.java
@@ -38,9 +38,6 @@ import org.apache.sysml.runtime.matrix.data.OutputInfo;
import scala.Tuple2;
-/**
- *
- */
public class DataPartitionerRemoteSparkReducer implements VoidFunction<Tuple2<Long, Iterable<Writable>>>
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/LocalTaskQueue.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/LocalTaskQueue.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/LocalTaskQueue.java
index 848ca7d..1ebaf00 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/LocalTaskQueue.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/LocalTaskQueue.java
@@ -55,8 +55,8 @@ public class LocalTaskQueue<T>
/**
* Synchronized insert of a new task to the end of the FIFO queue.
*
- * @param t
- * @throws InterruptedException
+ * @param t task
+ * @throws InterruptedException if InterruptedException occurs
*/
public synchronized void enqueueTask( T t )
throws InterruptedException
@@ -75,8 +75,8 @@ public class LocalTaskQueue<T>
/**
* Synchronized read and delete from the top of the FIFO queue.
*
- * @return
- * @throws InterruptedException
+ * @return task
+ * @throws InterruptedException if InterruptedException occurs
*/
@SuppressWarnings("unchecked")
public synchronized T dequeueTask()
@@ -110,8 +110,8 @@ public class LocalTaskQueue<T>
/**
* Synchronized read of the current number of tasks in the queue.
*
- * @return
- * @throws InterruptedException
+ * @return number of tasks in queue
+ * @throws InterruptedException if InterruptedException occurs
*/
public synchronized int size()
throws InterruptedException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
index b18d5b8..5c5c5a6 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ParWorker.java
@@ -79,11 +79,7 @@ public abstract class ParWorker
_numTasks = 0;
_numIters = 0;
}
-
- /**
- *
- * @return
- */
+
public LocalVariableMap getVariables()
{
return _ec.getVariables();
@@ -93,7 +89,7 @@ public abstract class ParWorker
* Returns a summary statistic of executed tasks and hence should only be called
* after execution.
*
- * @return
+ * @return number of executed tasks
*/
public long getExecutedTasks()
{
@@ -104,25 +100,19 @@ public abstract class ParWorker
* Returns a summary statistic of executed iterations and hence should only be called
* after execution.
*
- * @return
+ * @return number of executed iterations
*/
public long getExecutedIterations()
{
return _numIters;
}
-
- /**
- *
- */
+
public void resetExecutedTasks()
{
_numTasks = 0;
_numIters = 0;
}
-
- /**
- *
- */
+
protected void pinResultVariables()
{
for( String var : _resultVars )
@@ -136,11 +126,6 @@ public abstract class ParWorker
}
}
- /**
- *
- * @param task
- * @throws DMLRuntimeException
- */
protected void executeTask( Task task )
throws DMLRuntimeException
{
@@ -156,12 +141,7 @@ public abstract class ParWorker
break;
}
}
-
- /**
- *
- * @param task
- * @throws DMLRuntimeException
- */
+
private void executeSetTask( Task task )
throws DMLRuntimeException
{
@@ -202,12 +182,7 @@ public abstract class ParWorker
StatisticMonitor.putPWStat(_workerID, Stat.PARWRK_TASK_T, time2.stop());
}
}
-
- /**
- *
- * @param task
- * @throws DMLRuntimeException
- */
+
private void executeRangeTask( Task task )
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
index adf0144..16d00b9 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ProgramConverter.java
@@ -158,8 +158,10 @@ public class ProgramConverter
* Creates a deep copy of the given execution context.
* For rt_platform=Hadoop, execution context has a symbol table.
*
- * @throws CloneNotSupportedException
- * @throws DMLRuntimeException
+ * @param ec execution context
+ * @return execution context
+ * @throws CloneNotSupportedException if CloneNotSupportedException occurs
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static ExecutionContext createDeepCopyExecutionContext(ExecutionContext ec)
throws CloneNotSupportedException, DMLRuntimeException
@@ -199,13 +201,15 @@ public class ProgramConverter
* specified parallel worker in order to avoid conflicts between parworkers. This happens recursively in order
* to support arbitrary control-flow constructs within a parfor.
*
- * @param childBlocks
- * @param pid
- * @param plain full deep copy without id replacement
- * @param forceDeepCopy
- *
- * @return
- * @throws DMLRuntimeException
+ * @param childBlocks child program blocks
+ * @param pid ?
+ * @param IDPrefix ?
+ * @param fnStack ?
+ * @param fnCreated ?
+ * @param plain if true, full deep copy without id replacement
+ * @param forceDeepCopy if true, force deep copy
+ * @return list of program blocks
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static ArrayList<ProgramBlock> rcreateDeepCopyProgramBlocks(ArrayList<ProgramBlock> childBlocks, long pid, int IDPrefix, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
throws DMLRuntimeException
@@ -258,16 +262,7 @@ public class ProgramConverter
return tmp;
}
-
- /**
- *
- * @param wpb
- * @param pid
- * @param IDPrefix
- * @param prog
- * @return
- * @throws DMLRuntimeException
- */
+
public static WhileProgramBlock createDeepCopyWhileProgramBlock(WhileProgramBlock wpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
throws DMLRuntimeException
{
@@ -282,16 +277,7 @@ public class ProgramConverter
return tmpPB;
}
-
- /**
- *
- * @param ipb
- * @param pid
- * @param IDPrefix
- * @param prog
- * @return
- * @throws DMLRuntimeException
- */
+
public static IfProgramBlock createDeepCopyIfProgramBlock(IfProgramBlock ipb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
throws DMLRuntimeException
{
@@ -307,16 +293,7 @@ public class ProgramConverter
return tmpPB;
}
-
- /**
- *
- * @param fpb
- * @param pid
- * @param IDPrefix
- * @param prog
- * @return
- * @throws DMLRuntimeException
- */
+
public static ForProgramBlock createDeepCopyForProgramBlock(ForProgramBlock fpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
throws DMLRuntimeException
{
@@ -332,14 +309,7 @@ public class ProgramConverter
return tmpPB;
}
-
- /**
- *
- * @param fpb
- * @param prog
- * @return
- * @throws DMLRuntimeException
- */
+
public static ForProgramBlock createShallowCopyForProgramBlock(ForProgramBlock fpb, Program prog )
throws DMLRuntimeException
{
@@ -353,14 +323,7 @@ public class ProgramConverter
return tmpPB;
}
-
- /**
- *
- * @param pfpb
- * @param prog
- * @return
- * @throws DMLRuntimeException
- */
+
public static ForProgramBlock createShallowCopyParForProgramBlock(ParForProgramBlock pfpb, Program prog )
throws DMLRuntimeException
{
@@ -377,16 +340,7 @@ public class ProgramConverter
return tmpPB;
}
-
- /**
- *
- * @param pfpb
- * @param pid
- * @param IDPrefix
- * @param prog
- * @return
- * @throws DMLRuntimeException
- */
+
public static ParForProgramBlock createDeepCopyParForProgramBlock(ParForProgramBlock pfpb, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean forceDeepCopy)
throws DMLRuntimeException
{
@@ -423,9 +377,15 @@ public class ProgramConverter
* This creates a deep copy of a function program block. The central reference to singletons of function program blocks
* poses the need for explicit copies in order to prevent conflicting writes of temporary variables (see ExternalFunctionProgramBlock.
*
- * @param oldName
- * @param pid
- * @throws DMLRuntimeException
+ * @param namespace function namespace
+ * @param oldName ?
+ * @param pid ?
+ * @param IDPrefix ?
+ * @param prog runtime program
+ * @param fnStack ?
+ * @param fnCreated ?
+ * @param plain ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static void createDeepCopyFunctionProgramBlock(String namespace, String oldName, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain)
throws DMLRuntimeException
@@ -486,13 +446,7 @@ public class ProgramConverter
prog.addFunctionProgramBlock(namespace, fnameNew, copy);
fnCreated.add(DMLProgram.constructFunctionKey(namespace, fnameNew));
}
-
- /**
- *
- * @param fpb
- * @return
- * @throws DMLRuntimeException
- */
+
public static FunctionProgramBlock createDeepCopyFunctionProgramBlock(FunctionProgramBlock fpb, HashSet<String> fnStack, HashSet<String> fnCreated)
throws DMLRuntimeException
{
@@ -524,10 +478,16 @@ public class ProgramConverter
* IDs with the concrete IDs of this parfor instance. This is a helper method uses for generating
* deep copies of program blocks.
*
- * @param instSet
- * @param pid
- * @return
- * @throws DMLRuntimeException
+ * @param instSet list of instructions
+ * @param pid ?
+ * @param IDPrefix ?
+ * @param prog runtime program
+ * @param fnStack ?
+ * @param fnCreated ?
+ * @param plain ?
+ * @param cpFunctions ?
+ * @return list of instructions
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static ArrayList<Instruction> createDeepCopyInstructionSet(ArrayList<Instruction> instSet, long pid, int IDPrefix, Program prog, HashSet<String> fnStack, HashSet<String> fnCreated, boolean plain, boolean cpFunctions)
throws DMLRuntimeException
@@ -548,14 +508,7 @@ public class ProgramConverter
return tmp;
}
-
-
- /**
- *
- * @param pid
- * @return
- * @throws DMLRuntimeException
- */
+
public static Instruction cloneInstruction( Instruction oInst, long pid, boolean plain, boolean cpFunctions )
throws DMLRuntimeException
{
@@ -599,13 +552,7 @@ public class ProgramConverter
return inst;
}
-
- /**
- *
- * @param sb
- * @return
- * @throws DMLRuntimeException
- */
+
public static StatementBlock createStatementBlockCopy( StatementBlock sb, long pid, boolean plain, boolean forceDeepCopy )
throws DMLRuntimeException
{
@@ -645,15 +592,7 @@ public class ProgramConverter
return ret;
}
-
- /**
- *
- * @param sb
- * @param pid
- * @param plain
- * @return
- * @throws DMLRuntimeException
- */
+
public static IfStatementBlock createIfStatementBlockCopy( IfStatementBlock sb, long pid, boolean plain, boolean forceDeepCopy )
throws DMLRuntimeException
{
@@ -694,15 +633,7 @@ public class ProgramConverter
return ret;
}
-
- /**
- *
- * @param sb
- * @param pid
- * @param plain
- * @return
- * @throws DMLRuntimeException
- */
+
public static WhileStatementBlock createWhileStatementBlockCopy( WhileStatementBlock sb, long pid, boolean plain, boolean forceDeepCopy )
throws DMLRuntimeException
{
@@ -744,15 +675,7 @@ public class ProgramConverter
return ret;
}
-
- /**
- *
- * @param sb
- * @param pid
- * @param plain
- * @return
- * @throws DMLRuntimeException
- */
+
public static ForStatementBlock createForStatementBlockCopy( ForStatementBlock sb, long pid, boolean plain, boolean forceDeepCopy )
throws DMLRuntimeException
{
@@ -813,12 +736,7 @@ public class ProgramConverter
////////////////////////////////
// SERIALIZATION
////////////////////////////////
-
- /**
- * @param body
- * @return
- * @throws DMLRuntimeException
- */
+
public static String serializeParForBody( ParForBody body )
throws DMLRuntimeException
{
@@ -884,13 +802,7 @@ public class ProgramConverter
return sb.toString();
}
-
- /**
- *
- * @param prog
- * @return
- * @throws DMLRuntimeException
- */
+
public static String serializeProgram( Program prog, ArrayList<ProgramBlock> pbs )
throws DMLRuntimeException
{
@@ -903,13 +815,7 @@ public class ProgramConverter
return rSerializeFunctionProgramBlocks( fpb, cand );
}
-
- /**
- *
- * @param pbs
- * @param cand
- * @throws DMLRuntimeException
- */
+
public static void rFindSerializationCandidates( ArrayList<ProgramBlock> pbs, HashSet<String> cand )
throws DMLRuntimeException
{
@@ -951,14 +857,7 @@ public class ProgramConverter
}
}
}
-
-
- /**
- *
- * @param vars
- * @return
- * @throws DMLRuntimeException
- */
+
public static String serializeVariables (LocalVariableMap vars)
throws DMLRuntimeException
{
@@ -969,14 +868,7 @@ public class ProgramConverter
return sb.toString();
}
-
- /**
- *
- * @param key
- * @param dat
- * @return
- * @throws DMLRuntimeException
- */
+
public static String serializeDataObject(String key, Data dat)
throws DMLRuntimeException
{
@@ -1037,13 +929,7 @@ public class ProgramConverter
return sb.toString();
}
-
- /**
- *
- * @param ec
- * @return
- * @throws DMLRuntimeException
- */
+
public static String serializeExecutionContext( ExecutionContext ec )
throws DMLRuntimeException
{
@@ -1061,13 +947,7 @@ public class ProgramConverter
return ret;
}
-
- /**
- *
- * @param inst
- * @return
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("all")
public static String serializeInstructions( ArrayList<Instruction> inst )
throws DMLRuntimeException
@@ -1100,8 +980,8 @@ public class ProgramConverter
* (e.g. print( "a,b" ) would break the parsing of instruction that internally
* are separated with a "," )
*
- * @param instStr
- * @return
+ * @param instStr instruction string
+ * @return instruction string with replacements
*/
public static String checkAndReplaceLiterals( String instStr )
{
@@ -1139,13 +1019,7 @@ public class ProgramConverter
return tmp;
}
-
-
- /**
- *
- * @param vars
- * @return
- */
+
public static String serializeStringHashMap( HashMap<String,String> vars)
{
StringBuilder sb = new StringBuilder();
@@ -1161,12 +1035,7 @@ public class ProgramConverter
}
return sb.toString();
}
-
- /**
- *
- * @param vars
- * @return
- */
+
public static String serializeStringCollection( Collection<String> set)
{
StringBuilder sb = new StringBuilder();
@@ -1180,13 +1049,7 @@ public class ProgramConverter
}
return sb.toString();
}
-
-
- /**
- *
- * @param vars
- * @return
- */
+
public static String serializeStringArrayList( ArrayList<String> vars)
{
StringBuilder sb = new StringBuilder();
@@ -1200,12 +1063,7 @@ public class ProgramConverter
}
return sb.toString();
}
-
- /**
- *
- * @param vars
- * @return
- */
+
public static String serializeStringArray( String[] vars)
{
StringBuilder sb = new StringBuilder();
@@ -1224,11 +1082,6 @@ public class ProgramConverter
return sb.toString();
}
- /**
- *
- * @param var
- * @return
- */
public static String serializeDataIdentifiers( ArrayList<DataIdentifier> var)
{
StringBuilder sb = new StringBuilder();
@@ -1242,12 +1095,7 @@ public class ProgramConverter
}
return sb.toString();
}
-
- /**
- *
- * @param dat
- * @return
- */
+
public static String serializeDataIdentifier( DataIdentifier dat )
{
// SCHEMA: <name>|<datatype>|<valuetype>
@@ -1261,13 +1109,7 @@ public class ProgramConverter
return sb.toString();
}
-
- /**
- *
- * @param pbs
- * @return
- * @throws DMLRuntimeException
- */
+
public static String rSerializeFunctionProgramBlocks(HashMap<String,FunctionProgramBlock> pbs, HashSet<String> cand)
throws DMLRuntimeException
{
@@ -1293,13 +1135,7 @@ public class ProgramConverter
sb.append(NEWLINE);
return sb.toString();
}
-
- /**
- *
- * @param pbs
- * @return
- * @throws DMLRuntimeException
- */
+
public static String rSerializeProgramBlocks(ArrayList<ProgramBlock> pbs)
throws DMLRuntimeException
{
@@ -1318,13 +1154,7 @@ public class ProgramConverter
return sb.toString();
}
-
- /**
- *
- * @param pb
- * @return
- * @throws DMLRuntimeException
- */
+
public static String rSerializeProgramBlock( ProgramBlock pb)
throws DMLRuntimeException
{
@@ -1513,15 +1343,7 @@ public class ProgramConverter
////////////////////////////////
// PARSING
////////////////////////////////
-
-
- /**
- *
- * @param in
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static ParForBody parseParForBody( String in, int id )
throws DMLRuntimeException
{
@@ -1575,14 +1397,7 @@ public class ProgramConverter
return body;
}
-
- /**
- *
- * @param in
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static Program parseProgram( String in, int id )
throws DMLRuntimeException
{
@@ -1602,13 +1417,7 @@ public class ProgramConverter
return prog;
}
-
- /**
- *
- * @param in
- * @return
- * @throws DMLRuntimeException
- */
+
public static LocalVariableMap parseVariables(String in)
throws DMLRuntimeException
{
@@ -1626,15 +1435,7 @@ public class ProgramConverter
return ret;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static HashMap<String,FunctionProgramBlock> parseFunctionProgramBlocks( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1660,15 +1461,7 @@ public class ProgramConverter
return ret;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static ArrayList<ProgramBlock> rParseProgramBlocks(String in, Program prog, int id)
throws DMLRuntimeException
{
@@ -1684,15 +1477,7 @@ public class ProgramConverter
return pbs;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static ProgramBlock rParseProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1718,14 +1503,6 @@ public class ProgramConverter
return pb;
}
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
public static WhileProgramBlock rParseWhileProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1752,15 +1529,7 @@ public class ProgramConverter
return wpb;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static ForProgramBlock rParseForProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1793,15 +1562,7 @@ public class ProgramConverter
return fpb;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static ParForProgramBlock rParseParForProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1838,15 +1599,7 @@ public class ProgramConverter
return pfpb;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static IfProgramBlock rParseIfProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1875,15 +1628,7 @@ public class ProgramConverter
return ipb;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static FunctionProgramBlock rParseFunctionProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1911,15 +1656,7 @@ public class ProgramConverter
return fpb;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static ExternalFunctionProgramBlock rParseExternalFunctionProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1953,15 +1690,7 @@ public class ProgramConverter
return efpb;
}
-
- /**
- *
- * @param in
- * @param prog
- * @param id
- * @return
- * @throws DMLRuntimeException
- */
+
public static ProgramBlock rParseGenericProgramBlock( String in, Program prog, int id )
throws DMLRuntimeException
{
@@ -1975,13 +1704,7 @@ public class ProgramConverter
return pb;
}
-
- /**
- *
- * @param in
- * @return
- * @throws DMLRuntimeException
- */
+
public static ArrayList<Instruction> parseInstructions( String in, int id )
throws DMLRuntimeException
{
@@ -2008,12 +1731,7 @@ public class ProgramConverter
return insts;
}
-
- /**
- *
- * @param in
- * @return
- */
+
public static HashMap<String,String> parseStringHashMap( String in )
{
HashMap<String,String> vars = new HashMap<String, String>();
@@ -2029,12 +1747,7 @@ public class ProgramConverter
return vars;
}
-
- /**
- *
- * @param in
- * @return
- */
+
public static ArrayList<String> parseStringArrayList( String in )
{
ArrayList<String> vars = new ArrayList<String>();
@@ -2047,12 +1760,7 @@ public class ProgramConverter
return vars;
}
-
- /**
- *
- * @param in
- * @return
- */
+
public static String[] parseStringArray( String in )
{
StringTokenizer st = new StringTokenizer(in, ELEMENT_DELIM);
@@ -2069,11 +1777,6 @@ public class ProgramConverter
return a;
}
- /**
- *
- * @param in
- * @return
- */
public static ArrayList<DataIdentifier> parseDataIdentifiers( String in )
{
ArrayList<DataIdentifier> vars = new ArrayList<DataIdentifier>();
@@ -2087,12 +1790,7 @@ public class ProgramConverter
return vars;
}
-
- /**
- *
- * @param in
- * @return
- */
+
public static DataIdentifier parseDataIdentifier( String in )
{
StringTokenizer st = new StringTokenizer(in, DATA_FIELD_DELIM);
@@ -2111,9 +1809,9 @@ public class ProgramConverter
* NOTE: MRJobConfiguration cannot be used for the general case because program blocks and
* related symbol tables can be hierarchically structured.
*
- * @param in
- * @return
- * @throws DMLRuntimeException
+ * @param in data object as string
+ * @return array of objects
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static Object[] parseDataObject(String in)
throws DMLRuntimeException
@@ -2182,13 +1880,7 @@ public class ProgramConverter
ret[1] = dat;
return ret;
}
-
- /**
- *
- * @param in
- * @return
- * @throws DMLRuntimeException
- */
+
public static ExecutionContext parseExecutionContext(String in, Program prog)
throws DMLRuntimeException
{
@@ -2219,11 +1911,11 @@ public class ProgramConverter
/**
* In-place replacement of thread ids in filenames, functions names etc
*
- * @param instInst
- * @param pattern
- * @param replacement
- * @return
- * @throws DMLRuntimeException
+ * @param inst instruction
+ * @param pattern ?
+ * @param replacement string replacement
+ * @return instruction
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static Instruction saveReplaceThreadID( Instruction inst, String pattern, String replacement )
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForMR.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForMR.java
index 15b1fb3..39af0e5 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForMR.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForMR.java
@@ -69,20 +69,7 @@ public class RemoteDPParForMR
{
protected static final Log LOG = LogFactory.getLog(RemoteDPParForMR.class.getName());
-
- /**
- *
- * @param pfid
- * @param program
- * @param taskFile
- * @param resultFile
- * @param enableCPCaching
- * @param mode
- * @param numMappers
- * @param replication
- * @return
- * @throws DMLRuntimeException
- */
+
public static RemoteParForJobReturn runJob(long pfid, String itervar, String matrixvar, String program, String resultFile, MatrixObject input,
PDataPartitionFormat dpf, OutputInfo oi, boolean tSparseCol, //config params
boolean enableCPCaching, int numReducers, int replication, int max_retry) //opt params
@@ -247,10 +234,11 @@ public class RemoteDPParForMR
* (the RemoteParWorkerMapper ensures uniqueness of those files independent of the
* runtime implementation).
*
- * @param job
- * @param fname
- * @return
- * @throws DMLRuntimeException
+ * @param job job configuration
+ * @param fname file name
+ * @return array of local variable maps
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
+ * @throws IOException if IOException occurs
*/
@SuppressWarnings("deprecation")
public static LocalVariableMap [] readResultFile( JobConf job, String fname )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
index 484888e..7286eca 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSpark.java
@@ -54,20 +54,7 @@ public class RemoteDPParForSpark
{
protected static final Log LOG = LogFactory.getLog(RemoteDPParForSpark.class.getName());
-
- /**
- *
- * @param pfid
- * @param program
- * @param taskFile
- * @param resultFile
- * @param enableCPCaching
- * @param mode
- * @param numMappers
- * @param replication
- * @return
- * @throws DMLRuntimeException
- */
+
public static RemoteParForJobReturn runJob(long pfid, String itervar, String matrixvar, String program, String resultFile, MatrixObject input,
ExecutionContext ec,
PDataPartitionFormat dpf, OutputInfo oi, boolean tSparseCol, //config params
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
index 318a71e..2a0dc7d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParForSparkWorker.java
@@ -44,9 +44,6 @@ import org.apache.sysml.runtime.util.LocalFileUtils;
import scala.Tuple2;
-/**
- *
- */
public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapFunction<Iterator<Tuple2<Long, Iterable<Writable>>>, Long, String>
{
private static final long serialVersionUID = 30223759283155139L;
@@ -142,13 +139,7 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
return ret;
}
-
- /**
- *
- * @param ID
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private void configureWorker( long ID )
throws DMLRuntimeException, IOException
{
@@ -187,9 +178,9 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
* Note it reuses the instance attribute _partition - multiple calls
* will overwrite the result.
*
- * @param valueList
- * @return
- * @throws IOException
+ * @param valueList iterable writables
+ * @return matrix block
+ * @throws IOException if IOException occurs
*/
private MatrixBlock collectBinaryBlock( Iterable<Writable> valueList )
throws IOException
@@ -241,9 +232,9 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
* Note it reuses the instance attribute _partition - multiple calls
* will overwrite the result.
*
- * @param valueList
- * @return
- * @throws IOException
+ * @param valueList iterable writables
+ * @return matrix block
+ * @throws IOException if IOException occurs
*/
private MatrixBlock collectBinaryCellInput( Iterable<Writable> valueList )
throws IOException
@@ -288,12 +279,7 @@ public class RemoteDPParForSparkWorker extends ParWorker implements PairFlatMapF
return partition;
}
-
- /**
- *
- * @param sort
- * @throws IOException
- */
+
private void cleanupCollectedMatrixPartition(MatrixBlock partition, boolean sort)
throws IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java
index 893a2ac..ac6d42a 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java
@@ -50,9 +50,6 @@ import org.apache.sysml.runtime.matrix.mapred.MRJobConfiguration;
import org.apache.sysml.runtime.util.LocalFileUtils;
import org.apache.sysml.utils.Statistics;
-/**
- *
- */
public class RemoteDPParWorkerReducer extends ParWorker
implements Reducer<LongWritable, Writable, Writable, Writable>
{
@@ -78,10 +75,7 @@ public class RemoteDPParWorkerReducer extends ParWorker
//cached collector/reporter
protected OutputCollector<Writable, Writable> _out = null;
protected Reporter _report = null;
-
- /**
- *
- */
+
public RemoteDPParWorkerReducer()
{
@@ -124,9 +118,6 @@ public class RemoteDPParWorkerReducer extends ParWorker
RemoteParForUtils.incrementParForMRCounters(_report, 1, 1);
}
- /**
- *
- */
@Override
public void configure(JobConf job)
{
@@ -210,10 +201,7 @@ public class RemoteDPParWorkerReducer extends ParWorker
Statistics.reset();
}
}
-
- /**
- *
- */
+
@Override
public void close()
throws IOException
@@ -250,9 +238,9 @@ public class RemoteDPParWorkerReducer extends ParWorker
* Note it reuses the instance attribute _partition - multiple calls
* will overwrite the result.
*
- * @param valueList
- * @return
- * @throws IOException
+ * @param valueList iterable writables
+ * @return matrix block
+ * @throws IOException if IOException occurs
*/
private MatrixBlock collectBinaryBlock( Iterator<Writable> valueList )
throws IOException
@@ -299,9 +287,9 @@ public class RemoteDPParWorkerReducer extends ParWorker
* Note it reuses the instance attribute _partition - multiple calls
* will overwrite the result.
*
- * @param valueList
- * @return
- * @throws IOException
+ * @param valueList iterable writables
+ * @return matrix block
+ * @throws IOException if IOException occurs
*/
private MatrixBlock collectBinaryCellInput( Iterator<Writable> valueList )
throws IOException
@@ -344,12 +332,7 @@ public class RemoteDPParWorkerReducer extends ParWorker
return _partition;
}
-
- /**
- *
- * @param sort
- * @throws IOException
- */
+
private void cleanupCollectedMatrixPartition(boolean sort)
throws IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForColocatedFileSplit.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForColocatedFileSplit.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForColocatedFileSplit.java
index 2bbb63a..0b01569 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForColocatedFileSplit.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForColocatedFileSplit.java
@@ -142,12 +142,6 @@ public class RemoteParForColocatedFileSplit extends FileSplit
return getTopHosts(hosts);
}
-
- /**
- *
- * @param hosts
- * @param names
- */
private void countHosts( HashMap<String,Integer> hosts, String[] names )
{
for( String name : names )
@@ -159,12 +153,7 @@ public class RemoteParForColocatedFileSplit extends FileSplit
hosts.put(name, 1);
}
}
-
- /**
- *
- * @param hosts
- * @return
- */
+
private String[] getTopHosts( HashMap<String,Integer> hosts )
{
int max = Integer.MIN_VALUE;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForJobReturn.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForJobReturn.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForJobReturn.java
index 71bf2da..ef0856e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForJobReturn.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForJobReturn.java
@@ -42,46 +42,26 @@ public class RemoteParForJobReturn
_variables = variables;
}
- /**
- *
- * @return
- */
public boolean isSuccessful()
{
return _successful;
}
-
- /**
- *
- * @return
- */
+
public int getNumExecutedTasks()
{
return _numTasks;
}
-
- /**
- *
- * @return
- */
+
public int getNumExecutedIterations()
{
return _numIters;
}
-
- /**
- *
- * @return
- */
+
public LocalVariableMap [] getVariables()
{
return _variables;
}
-
- /**
- *
- * @param variables
- */
+
public void setVariables (LocalVariableMap [] variables)
{
_variables = variables;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForMR.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForMR.java
index 7710fe8..7c9332d 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForMR.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForMR.java
@@ -66,20 +66,7 @@ public class RemoteParForMR
{
protected static final Log LOG = LogFactory.getLog(RemoteParForMR.class.getName());
-
- /**
- *
- * @param pfid
- * @param program
- * @param taskFile
- * @param resultFile
- * @param _enableCPCaching
- * @param mode
- * @param numMappers
- * @param replication
- * @return
- * @throws DMLRuntimeException
- */
+
public static RemoteParForJobReturn runJob(long pfid, String program, String taskFile, String resultFile, MatrixObject colocatedDPMatrixObj, //inputs
boolean enableCPCaching, int numMappers, int replication, int max_retry, long minMem, boolean jvmReuse) //opt params
throws DMLRuntimeException
@@ -258,10 +245,11 @@ public class RemoteParForMR
* (the RemoteParWorkerMapper ensures uniqueness of those files independent of the
* runtime implementation).
*
- * @param job
- * @param fname
- * @return
- * @throws DMLRuntimeException
+ * @param job job configuration
+ * @param fname file name
+ * @return array of local variable maps
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
+ * @throws IOException if IOException occurs
*/
@SuppressWarnings("deprecation")
public static LocalVariableMap [] readResultFile( JobConf job, String fname )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
index c228840..47ea2e6 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSpark.java
@@ -52,18 +52,7 @@ public class RemoteParForSpark
{
protected static final Log LOG = LogFactory.getLog(RemoteParForSpark.class.getName());
-
- /**
- *
- * @param pfid
- * @param program
- * @param tasks
- * @param ec
- * @param enableCPCaching
- * @param numMappers
- * @return
- * @throws DMLRuntimeException
- */
+
public static RemoteParForJobReturn runJob(long pfid, String program, List<Task> tasks, ExecutionContext ec,
boolean cpCaching, int numMappers)
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
index 18b5ca2..4dc5126 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForSparkWorker.java
@@ -33,10 +33,6 @@ import org.apache.sysml.runtime.util.LocalFileUtils;
import scala.Tuple2;
-/**
- *
- *
- */
public class RemoteParForSparkWorker extends ParWorker implements PairFlatMapFunction<Task, Long, String>
{
@@ -88,13 +84,7 @@ public class RemoteParForSparkWorker extends ParWorker implements PairFlatMapFun
return ret;
}
-
- /**
- *
- * @param ID
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private void configureWorker( long ID )
throws DMLRuntimeException, IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForUtils.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForUtils.java
index 67beff6..7b3ecb1 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParForUtils.java
@@ -56,13 +56,7 @@ import org.apache.sysml.utils.Statistics;
*/
public class RemoteParForUtils
{
-
- /**
- *
- * @param reporter
- * @param deltaTasks
- * @param deltaIterations
- */
+
public static void incrementParForMRCounters(Reporter reporter, long deltaTasks, long deltaIterations)
{
//report parfor counters
@@ -94,16 +88,7 @@ public class RemoteParForUtils
CacheStatistics.reset();
}
}
-
- /**
- *
- * @param workerID
- * @param vars
- * @param resultVars
- * @param out
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
public static void exportResultVariables( long workerID, LocalVariableMap vars, ArrayList<String> resultVars, OutputCollector<Writable, Writable> out )
throws DMLRuntimeException, IOException
{
@@ -113,13 +98,13 @@ public class RemoteParForUtils
/**
* For remote MR parfor workers.
*
- * @param workerID
- * @param vars
- * @param resultVars
- * @param rvarFnames
- * @param out
- * @throws DMLRuntimeException
- * @throws IOException
+ * @param workerID worker id
+ * @param vars local variable map
+ * @param resultVars list of result variables
+ * @param rvarFnames ?
+ * @param out output collector
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
+ * @throws IOException if IOException occurs
*/
public static void exportResultVariables( long workerID, LocalVariableMap vars, ArrayList<String> resultVars,
HashMap<String,String> rvarFnames, OutputCollector<Writable, Writable> out )
@@ -169,12 +154,12 @@ public class RemoteParForUtils
/**
* For remote Spark parfor workers. This is a simplified version compared to MR.
*
- * @param workerID
- * @param vars
- * @param resultVars
- * @param rvarFnames
- * @throws DMLRuntimeException
- * @throws IOException
+ * @param workerID worker id
+ * @param vars local variable map
+ * @param resultVars list of result variables
+ * @return list of result variables
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
+ * @throws IOException if IOException occurs
*/
public static ArrayList<String> exportResultVariables( long workerID, LocalVariableMap vars, ArrayList<String> resultVars)
throws DMLRuntimeException, IOException
@@ -230,14 +215,7 @@ public class RemoteParForUtils
LocalFileUtils.cleanupWorkingDirectory();
}
}
-
- /**
- *
- * @param out
- * @return
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
public static LocalVariableMap[] getResults( List<Tuple2<Long,String>> out, Log LOG )
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java
index ae68b68..4befedc 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java
@@ -77,10 +77,7 @@ public class RemoteParWorkerMapper extends ParWorker //MapReduceBase not requir
//filenames across tasks of one reused worker (preaggregation)
_rvarFnames = new HashMap<String, String>();
}
-
- /**
- *
- */
+
@Override
public void map(LongWritable key, Text value, OutputCollector<Writable, Writable> out, Reporter reporter)
throws IOException
@@ -116,9 +113,6 @@ public class RemoteParWorkerMapper extends ParWorker //MapReduceBase not requir
LOG.info("\nSystemML Statistics:\nHeavy hitter instructions (name, time, count):\n" + Statistics.getHeavyHitters(DMLScript.STATISTICS_COUNT));
}
- /**
- *
- */
@Override
public void configure(JobConf job)
{
@@ -224,9 +218,6 @@ public class RemoteParWorkerMapper extends ParWorker //MapReduceBase not requir
}
}
- /**
- *
- */
@Override
public void close()
throws IOException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMerge.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMerge.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMerge.java
index aa7c1c1..2b10a86 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMerge.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMerge.java
@@ -65,7 +65,7 @@ public abstract class ResultMerge
* of one input matrix at a time.
*
* @return output (merged) matrix
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract MatrixObject executeSerialMerge()
throws DMLRuntimeException;
@@ -77,17 +77,18 @@ public abstract class ResultMerge
*
* @param par degree of parallelism
* @return output (merged) matrix
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract MatrixObject executeParallelMerge( int par )
throws DMLRuntimeException;
/**
+ * ?
*
* @param out initially empty block
- * @param in
- * @param appendOnly
- * @throws DMLRuntimeException
+ * @param in input matrix block
+ * @param appendOnly ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected void mergeWithoutComp( MatrixBlock out, MatrixBlock in, boolean appendOnly )
throws DMLRuntimeException
@@ -100,9 +101,10 @@ public abstract class ResultMerge
* NOTE: append only not applicable for wiht compare because output must be populated with
* initial state of matrix - with append, this would result in duplicates.
*
- * @param out
- * @param in
- * @throws DMLRuntimeException
+ * @param out output matrix block
+ * @param in input matrix block
+ * @param compare ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected void mergeWithComp( MatrixBlock out, MatrixBlock in, double[][] compare )
throws DMLRuntimeException
@@ -161,12 +163,7 @@ public abstract class ResultMerge
return ret;
}
-
- /**
- *
- * @param in
- * @return
- */
+
protected ArrayList<MatrixObject> convertToList(MatrixObject[] in)
{
ArrayList<MatrixObject> ret = new ArrayList<MatrixObject>();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalAutomatic.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalAutomatic.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalAutomatic.java
index 44aaf2a..fe190ed 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalAutomatic.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalAutomatic.java
@@ -27,9 +27,6 @@ import org.apache.sysml.runtime.controlprogram.parfor.opt.OptimizerRuleBased;
import org.apache.sysml.runtime.controlprogram.parfor.stat.Timing;
import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
-/**
- *
- */
public class ResultMergeLocalAutomatic extends ResultMerge
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalFile.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalFile.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalFile.java
index 9c7e7d3..7e50f0b 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalFile.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalFile.java
@@ -152,13 +152,6 @@ public class ResultMergeLocalFile extends ResultMerge
return executeSerialMerge();
}
- /**
- *
- * @param output
- * @param inMO
- * @return
- * @throws DMLRuntimeException
- */
private MatrixObject createNewMatrixObject(MatrixObject output, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
{
@@ -182,14 +175,7 @@ public class ResultMergeLocalFile extends ResultMerge
return moNew;
}
-
- /**
- *
- * @param fnameNew
- * @param outMo
- * @param inMO
- * @throws DMLRuntimeException
- */
+
private void merge( String fnameNew, MatrixObject outMo, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
{
@@ -218,14 +204,7 @@ public class ResultMergeLocalFile extends ResultMerge
mergeBinaryBlockWithoutComp( fnameNew, outMo, inMO );
}
}
-
- /**
- *
- * @param fnameNew
- * @param outMo
- * @param inMO
- * @throws DMLRuntimeException
- */
+
private void mergeTextCellWithoutComp( String fnameNew, MatrixObject outMo, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
{
@@ -294,14 +273,7 @@ public class ResultMergeLocalFile extends ResultMerge
throw new DMLRuntimeException("Unable to merge text cell results.", ex);
}
}
-
- /**
- *
- * @param fnameNew
- * @param outMo
- * @param inMO
- * @throws DMLRuntimeException
- */
+
private void mergeTextCellWithComp( String fnameNew, MatrixObject outMo, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
{
@@ -337,14 +309,7 @@ public class ResultMergeLocalFile extends ResultMerge
LocalFileUtils.cleanupWorkingDirectory(fnameStaging);
LocalFileUtils.cleanupWorkingDirectory(fnameStagingCompare);
}
-
- /**
- *
- * @param fnameNew
- * @param outMo
- * @param inMO
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("deprecation")
private void mergeBinaryCellWithoutComp( String fnameNew, MatrixObject outMo, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
@@ -407,14 +372,7 @@ public class ResultMergeLocalFile extends ResultMerge
throw new DMLRuntimeException("Unable to merge binary cell results.", ex);
}
}
-
- /**
- *
- * @param fnameNew
- * @param outMo
- * @param inMO
- * @throws DMLRuntimeException
- */
+
private void mergeBinaryCellWithComp( String fnameNew, MatrixObject outMo, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
{
@@ -450,14 +408,7 @@ public class ResultMergeLocalFile extends ResultMerge
LocalFileUtils.cleanupWorkingDirectory(fnameStaging);
LocalFileUtils.cleanupWorkingDirectory(fnameStagingCompare);
}
-
- /**
- *
- * @param fnameNew
- * @param outMo
- * @param inMO
- * @throws DMLRuntimeException
- */
+
private void mergeBinaryBlockWithoutComp( String fnameNew, MatrixObject outMo, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
{
@@ -486,14 +437,7 @@ public class ResultMergeLocalFile extends ResultMerge
LocalFileUtils.cleanupWorkingDirectory(fnameStaging);
}
-
- /**
- *
- * @param fnameNew
- * @param outMo
- * @param inMO
- * @throws DMLRuntimeException
- */
+
private void mergeBinaryBlockWithComp( String fnameNew, MatrixObject outMo, ArrayList<MatrixObject> inMO )
throws DMLRuntimeException
{
@@ -528,13 +472,7 @@ public class ResultMergeLocalFile extends ResultMerge
LocalFileUtils.cleanupWorkingDirectory(fnameStaging);
LocalFileUtils.cleanupWorkingDirectory(fnameStagingCompare);
}
-
- /**
- *
- * @param fnameStaging
- * @param mo
- * @throws IOException
- */
+
@SuppressWarnings("deprecation")
private void createBinaryBlockStagingFile( String fnameStaging, MatrixObject mo )
throws IOException
@@ -569,16 +507,7 @@ public class ResultMergeLocalFile extends ResultMerge
}
}
}
-
- /**
- *
- * @param fnameStaging
- * @param mo
- * @param ID
- * @throws IOException
- * @throws DMLRuntimeException
- */
-
+
private void createTextCellStagingFile( String fnameStaging, MatrixObject mo, long ID )
throws IOException, DMLRuntimeException
{
@@ -641,15 +570,7 @@ public class ResultMergeLocalFile extends ResultMerge
}
}
}
-
- /**
- *
- * @param fnameStaging
- * @param mo
- * @param ID
- * @throws IOException
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("deprecation")
private void createBinaryCellStagingFile( String fnameStaging, MatrixObject mo, long ID )
throws IOException, DMLRuntimeException
@@ -697,16 +618,7 @@ public class ResultMergeLocalFile extends ResultMerge
}
}
}
-
- /**
- * @param fnameStaging
- * @param ID
- * @param buffer
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private void appendCellBufferToStagingArea( String fnameStaging, long ID, LinkedList<Cell> buffer, int brlen, int bclen )
throws DMLRuntimeException, IOException
{
@@ -744,17 +656,7 @@ public class ResultMergeLocalFile extends ResultMerge
}
}
}
-
- /**
- *
- * @param fnameStaging
- * @param fnameStagingCompare
- * @param fnameNew
- * @param metadata
- * @param withCompare
- * @throws IOException
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("deprecation")
private void createBinaryBlockResultFile( String fnameStaging, String fnameStagingCompare, String fnameNew, MatrixFormatMetaData metadata, boolean withCompare )
throws IOException, DMLRuntimeException
@@ -853,17 +755,7 @@ public class ResultMergeLocalFile extends ResultMerge
writer.close();
}
}
-
- /**
- *
- * @param fnameStaging
- * @param fnameStagingCompare
- * @param fnameNew
- * @param metadata
- * @param withCompare
- * @throws IOException
- * @throws DMLRuntimeException
- */
+
private void createTextCellResultFile( String fnameStaging, String fnameStagingCompare, String fnameNew, MatrixFormatMetaData metadata, boolean withCompare )
throws IOException, DMLRuntimeException
{
@@ -1002,16 +894,6 @@ public class ResultMergeLocalFile extends ResultMerge
}
}
- /**
- *
- * @param fnameStaging
- * @param fnameStagingCompare
- * @param fnameNew
- * @param metadata
- * @param withCompare
- * @throws IOException
- * @throws DMLRuntimeException
- */
@SuppressWarnings("deprecation")
private void createBinaryCellResultFile( String fnameStaging, String fnameStagingCompare, String fnameNew, MatrixFormatMetaData metadata, boolean withCompare )
throws IOException, DMLRuntimeException
@@ -1142,13 +1024,6 @@ public class ResultMergeLocalFile extends ResultMerge
}
}
- /**
- *
- * @param fnameNew
- * @param inMO
- * @throws CacheException
- * @throws IOException
- */
private void copyAllFiles( String fnameNew, ArrayList<MatrixObject> inMO )
throws CacheException, IOException
{
[5/5] incubator-systemml git commit: [SYSTEMML-842] Javadoc cleanup
in runtime compress and controlprogram packages
Posted by de...@apache.org.
[SYSTEMML-842] Javadoc cleanup in runtime compress and controlprogram packages
Remove blank comments.
Fix broken comments.
Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/56e45f1a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/56e45f1a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/56e45f1a
Branch: refs/heads/master
Commit: 56e45f1a2751dc79f0601be20859c4fce141e87f
Parents: ef37de6
Author: Deron Eriksson <de...@us.ibm.com>
Authored: Mon Nov 14 14:57:08 2016 -0800
Committer: Deron Eriksson <de...@us.ibm.com>
Committed: Mon Nov 14 14:57:09 2016 -0800
----------------------------------------------------------------------
.../java/org/apache/sysml/api/MLMatrix.java | 5 +-
.../sysml/runtime/DMLScriptException.java | 2 +-
.../runtime/compress/BitmapDecoderOLE.java | 4 +-
.../runtime/compress/BitmapDecoderRLE.java | 4 +-
.../sysml/runtime/compress/BitmapEncoder.java | 34 +-
.../apache/sysml/runtime/compress/ColGroup.java | 65 ++-
.../sysml/runtime/compress/ColGroupBitmap.java | 90 +--
.../sysml/runtime/compress/ColGroupOLE.java | 48 +-
.../sysml/runtime/compress/ColGroupRLE.java | 42 +-
.../runtime/compress/ColGroupUncompressed.java | 5 +-
.../runtime/compress/CompressedMatrixBlock.java | 176 ++----
.../runtime/compress/PlanningBinPacker.java | 24 +-
.../sysml/runtime/compress/PlanningCoCoder.java | 63 +-
.../runtime/compress/PlanningCoCodingGroup.java | 5 +
.../runtime/compress/ReaderColumnSelection.java | 6 +-
.../compress/ReaderColumnSelectionDense.java | 4 -
.../ReaderColumnSelectionDenseSample.java | 4 -
.../compress/ReaderColumnSelectionSparse.java | 4 -
.../runtime/compress/UncompressedBitmap.java | 12 +-
.../compress/estim/CompressedSizeEstimator.java | 39 +-
.../estim/CompressedSizeEstimatorSample.java | 112 +---
.../compress/estim/SizeEstimatorFactory.java | 8 +-
.../runtime/compress/utils/ConverterUtils.java | 18 +-
.../sysml/runtime/compress/utils/DblArray.java | 10 -
.../compress/utils/DblArrayIntListHashMap.java | 37 +-
.../compress/utils/DoubleIntListHashMap.java | 37 +-
.../runtime/compress/utils/IntArrayList.java | 17 +-
.../compress/utils/LinearAlgebraUtils.java | 108 +---
.../ExternalFunctionProgramBlock.java | 96 ++-
.../ExternalFunctionProgramBlockCP.java | 11 +-
.../runtime/controlprogram/ForProgramBlock.java | 8 -
.../controlprogram/FunctionProgramBlock.java | 6 +-
.../runtime/controlprogram/IfProgramBlock.java | 8 +-
.../controlprogram/LocalVariableMap.java | 62 +-
.../controlprogram/ParForProgramBlock.java | 248 ++------
.../sysml/runtime/controlprogram/Program.java | 28 +-
.../runtime/controlprogram/ProgramBlock.java | 67 +--
.../controlprogram/caching/ByteBuffer.java | 40 +-
.../controlprogram/caching/CacheBlock.java | 39 +-
.../caching/CacheBlockFactory.java | 19 +-
.../controlprogram/caching/CacheDataInput.java | 16 +-
.../controlprogram/caching/CacheDataOutput.java | 24 +-
.../controlprogram/caching/CacheableData.java | 271 ++-------
.../controlprogram/caching/FrameObject.java | 46 +-
.../controlprogram/caching/LazyWriteBuffer.java | 47 +-
.../controlprogram/caching/MatrixObject.java | 97 +---
.../controlprogram/caching/PageCache.java | 27 +-
.../context/ExecutionContext.java | 119 ++--
.../context/ExecutionContextFactory.java | 12 +-
.../context/SparkExecutionContext.java | 333 +++--------
.../controlprogram/parfor/DataPartitioner.java | 49 +-
.../parfor/DataPartitionerLocal.java | 85 +--
.../parfor/DataPartitionerRemoteMapper.java | 18 +-
.../parfor/DataPartitionerRemoteReducer.java | 8 +-
.../parfor/DataPartitionerRemoteSpark.java | 11 +-
.../DataPartitionerRemoteSparkReducer.java | 3 -
.../controlprogram/parfor/LocalTaskQueue.java | 12 +-
.../controlprogram/parfor/ParWorker.java | 39 +-
.../controlprogram/parfor/ProgramConverter.java | 482 +++-------------
.../controlprogram/parfor/RemoteDPParForMR.java | 24 +-
.../parfor/RemoteDPParForSpark.java | 15 +-
.../parfor/RemoteDPParForSparkWorker.java | 30 +-
.../parfor/RemoteDPParWorkerReducer.java | 35 +-
.../parfor/RemoteParForColocatedFileSplit.java | 13 +-
.../parfor/RemoteParForJobReturn.java | 28 +-
.../controlprogram/parfor/RemoteParForMR.java | 24 +-
.../parfor/RemoteParForSpark.java | 13 +-
.../parfor/RemoteParForSparkWorker.java | 12 +-
.../parfor/RemoteParForUtils.java | 54 +-
.../parfor/RemoteParWorkerMapper.java | 11 +-
.../controlprogram/parfor/ResultMerge.java | 25 +-
.../parfor/ResultMergeLocalAutomatic.java | 3 -
.../parfor/ResultMergeLocalFile.java | 151 +----
.../parfor/ResultMergeLocalMemory.java | 23 +-
.../parfor/ResultMergeRemoteMR.java | 15 +-
.../parfor/ResultMergeRemoteMapper.java | 5 +-
.../parfor/ResultMergeRemoteReducer.java | 8 +-
.../parfor/ResultMergeRemoteSpark.java | 24 +-
.../parfor/ResultMergeRemoteSparkWCompare.java | 3 -
.../runtime/controlprogram/parfor/Task.java | 31 +-
.../controlprogram/parfor/TaskPartitioner.java | 13 +-
.../parfor/TaskPartitionerFactoring.java | 5 +-
.../parfor/TaskPartitionerFactoringCmax.java | 2 +-
.../parfor/mqo/MergedMRJobInstruction.java | 8 +-
.../parfor/mqo/PiggybackingWorker.java | 31 +-
.../PiggybackingWorkerUtilDecayParallel.java | 7 +-
.../mqo/PiggybackingWorkerUtilTimeParallel.java | 5 -
.../parfor/mqo/RuntimePiggybacking.java | 54 +-
.../parfor/mqo/RuntimePiggybackingUtils.java | 4 +-
.../parfor/opt/CostEstimator.java | 97 +---
.../parfor/opt/CostEstimatorHops.java | 4 -
.../parfor/opt/CostEstimatorRuntime.java | 74 +--
.../controlprogram/parfor/opt/CostFunction.java | 31 +-
.../controlprogram/parfor/opt/MemoTable.java | 44 +-
.../parfor/opt/MemoTableEntry.java | 4 -
.../controlprogram/parfor/opt/OptNode.java | 129 +----
.../controlprogram/parfor/opt/OptTree.java | 4 +-
.../parfor/opt/OptTreeConverter.java | 144 +----
.../parfor/opt/OptTreePlanChecker.java | 65 +--
.../parfor/opt/OptTreePlanMapping.java | 19 +-
.../parfor/opt/OptimizationWrapper.java | 70 +--
.../controlprogram/parfor/opt/Optimizer.java | 48 +-
.../parfor/opt/OptimizerConstrained.java | 60 +-
.../parfor/opt/OptimizerRuleBased.java | 577 +++----------------
.../parfor/opt/PerfTestMemoryObserver.java | 28 +-
.../controlprogram/parfor/opt/PerfTestTool.java | 307 ++--------
.../parfor/opt/ProgramRecompiler.java | 118 +---
.../parfor/stat/InfrastructureAnalyzer.java | 103 +---
.../parfor/stat/StatisticMonitor.java | 18 +-
.../controlprogram/parfor/stat/Timing.java | 2 +-
.../controlprogram/parfor/util/IDHandler.java | 44 +-
.../parfor/util/StagingFileUtils.java | 16 +-
112 files changed, 1199 insertions(+), 4797 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/api/MLMatrix.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/api/MLMatrix.java b/src/main/java/org/apache/sysml/api/MLMatrix.java
index ac6ad16..b91d09b 100644
--- a/src/main/java/org/apache/sysml/api/MLMatrix.java
+++ b/src/main/java/org/apache/sysml/api/MLMatrix.java
@@ -31,9 +31,6 @@ import org.apache.spark.sql.SQLContext;
import org.apache.spark.sql.SQLContext.QueryExecution;
import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan;
import org.apache.spark.sql.types.StructType;
-
-import scala.Tuple2;
-
import org.apache.sysml.hops.OptimizerUtils;
import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.instructions.spark.functions.GetMIMBFromRow;
@@ -42,6 +39,8 @@ import org.apache.sysml.runtime.matrix.MatrixCharacteristics;
import org.apache.sysml.runtime.matrix.data.MatrixBlock;
import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
+import scala.Tuple2;
+
/**
* Experimental API: Might be discontinued in future release
*
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/DMLScriptException.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/DMLScriptException.java b/src/main/java/org/apache/sysml/runtime/DMLScriptException.java
index f49ccb9..38785e3 100644
--- a/src/main/java/org/apache/sysml/runtime/DMLScriptException.java
+++ b/src/main/java/org/apache/sysml/runtime/DMLScriptException.java
@@ -40,7 +40,7 @@ public class DMLScriptException extends DMLRuntimeException
/**
* This is the only valid constructor for DMLScriptException.
*
- * @param string
+ * @param msg message
*/
public DMLScriptException(String msg) {
super(msg);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderOLE.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderOLE.java b/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderOLE.java
index 539d1f5..3dc8462 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderOLE.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderOLE.java
@@ -48,11 +48,13 @@ public final class BitmapDecoderOLE implements Iterator<Integer>
/**
* Point this object at the beginning of a particular bitmap. After a call
- * to this method, the next call to {@link #nextOffset()} will return the
+ * to this method, the next call to {@link #next()} will return the
* offset of the first bit in the specified bitmap.
*
* @param bmPtr
* pointer to a compressed bitmap
+ * @param off offset
+ * @param len length
*/
public BitmapDecoderOLE(char[] bmPtr, int off, int len) {
_bmOff = off;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderRLE.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderRLE.java b/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderRLE.java
index f2e05a4..d599c9e 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderRLE.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/BitmapDecoderRLE.java
@@ -47,11 +47,13 @@ public final class BitmapDecoderRLE implements Iterator<Integer>
/**
* Point this object at the beginning of a particular bitmap. After a call
- * to this method, the next call to {@link #nextOffset()} will return the
+ * to this method, the next call to {@link #next()} will return the
* offset of the first bit in the specified bitmap.
*
* @param bmPtr
* pointer to a compressed bitmap
+ * @param off offset
+ * @param len length
*/
public BitmapDecoderRLE(char[] bmPtr, int off, int len) {
_bmOff = off;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/BitmapEncoder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/BitmapEncoder.java b/src/main/java/org/apache/sysml/runtime/compress/BitmapEncoder.java
index 75ddf9a..7fd2c69 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/BitmapEncoder.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/BitmapEncoder.java
@@ -22,7 +22,6 @@ package org.apache.sysml.runtime.compress;
import java.util.ArrayList;
import java.util.Arrays;
-import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.compress.utils.DblArray;
import org.apache.sysml.runtime.compress.utils.DblArrayIntListHashMap;
import org.apache.sysml.runtime.compress.utils.DoubleIntListHashMap;
@@ -49,7 +48,6 @@ public class BitmapEncoder
* @param rawblock
* an uncompressed matrix block; can be dense or sparse
* @return uncompressed bitmap representation of the columns
- * @throws DMLRuntimeException
*/
public static UncompressedBitmap extractBitmap(int[] colIndices, MatrixBlock rawblock)
{
@@ -73,13 +71,6 @@ public class BitmapEncoder
}
}
- /**
- *
- * @param colIndices
- * @param rawblock
- * @param sampleIndexes
- * @return
- */
public static UncompressedBitmap extractBitmapFromSample(int[] colIndices,
MatrixBlock rawblock, int[] sampleIndexes)
{
@@ -248,13 +239,6 @@ public class BitmapEncoder
return encodedBlocks;
}
- /**
- *
- * @param colIndex
- * @param rawblock
- * @return
- * @throws DMLRuntimeException
- */
private static UncompressedBitmap extractBitmap(int colIndex, MatrixBlock rawblock, boolean skipZeros)
{
//probe map for distinct items (for value or value groups)
@@ -327,14 +311,7 @@ public class BitmapEncoder
return new UncompressedBitmap(distinctVals);
}
-
- /**
- *
- * @param colIndex
- * @param rawblock
- * @param sampleIndexes
- * @return
- */
+
private static UncompressedBitmap extractBitmap(int colIndex, MatrixBlock rawblock, int[] sampleIndexes, boolean skipZeros)
{
//note: general case only because anyway binary search for small samples
@@ -361,14 +338,7 @@ public class BitmapEncoder
return new UncompressedBitmap(distinctVals);
}
-
- /**
- *
- * @param colIndices
- * @param rawblock
- * @param rowReader
- * @return
- */
+
private static UncompressedBitmap extractBitmap(int[] colIndices,
MatrixBlock rawblock, ReaderColumnSelection rowReader)
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ColGroup.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ColGroup.java b/src/main/java/org/apache/sysml/runtime/compress/ColGroup.java
index a79f660..586690c 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ColGroup.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ColGroup.java
@@ -61,6 +61,7 @@ public abstract class ColGroup implements Serializable
/**
* Main constructor.
*
+ * @param type compression type
* @param colIndices
* offsets of the columns in the matrix block that make up the
* group
@@ -73,7 +74,13 @@ public abstract class ColGroup implements Serializable
_numRows = numRows;
}
- /** Convenience constructor for converting indices to a more compact format. */
+ /**
+ * Convenience constructor for converting indices to a more compact format.
+ *
+ * @param type compression type
+ * @param colIndicesList list of column indices
+ * @param numRows total number of rows in the parent block
+ */
protected ColGroup(CompressionType type, List<Integer> colIndicesList, int numRows) {
_compType = type;
_colIndexes = new int[colIndicesList.size()];
@@ -83,6 +90,8 @@ public abstract class ColGroup implements Serializable
}
/**
+ * Obtain the offsets of the columns in the matrix block that make up the group
+ *
* @return offsets of the columns in the matrix block that make up the group
*/
public int[] getColIndices() {
@@ -90,10 +99,10 @@ public abstract class ColGroup implements Serializable
}
/**
- * @param col
- * an index from 0 to the number of columns in this group - 1
- * @return offset of the specified column in the matrix block that make up
- * the group
+ * Obtain a column index value.
+ *
+ * @param colNum column number
+ * @return column index value
*/
public int getColIndex(int colNum) {
return _colIndexes[colNum];
@@ -104,6 +113,8 @@ public abstract class ColGroup implements Serializable
}
/**
+ * Obtain the number of columns in this column group.
+ *
* @return number of columns in this column group
*/
public int getNumCols() {
@@ -111,16 +122,14 @@ public abstract class ColGroup implements Serializable
}
/**
+ * Obtain the compression type.
+ *
* @return How the elements of the column group are compressed.
*/
public CompressionType getCompType() {
return _compType;
}
- /**
- *
- * @param offset
- */
public void shiftColIndices(int offset) {
for( int i=0; i<_colIndexes.length; i++ )
_colIndexes[i] += offset;
@@ -151,6 +160,8 @@ public abstract class ColGroup implements Serializable
* @param target
* a matrix block where the columns covered by this column group
* have not yet been filled in.
+ * @param rl row lower
+ * @param ru row upper
*/
public abstract void decompressToBlock(MatrixBlock target, int rl, int ru);
@@ -168,6 +179,7 @@ public abstract class ColGroup implements Serializable
public abstract void decompressToBlock(MatrixBlock target, int[] colIndexTargets);
/**
+ * Decompress to block.
*
* @param target dense output vector
* @param colpos column to decompress, error if larger or equal numCols
@@ -178,8 +190,8 @@ public abstract class ColGroup implements Serializable
/**
* Serializes column group to data output.
*
- * @param out
- * @throws IOException
+ * @param out data output
+ * @throws IOException if IOException occurs
*/
public abstract void write(DataOutput out)
throws IOException;
@@ -187,8 +199,8 @@ public abstract class ColGroup implements Serializable
/**
* Deserializes column group from data input.
*
- * @param in
- * @throws IOException
+ * @param in data input
+ * @throws IOException if IOException occurs
*/
public abstract void readFields(DataInput in)
throws IOException;
@@ -198,16 +210,16 @@ public abstract class ColGroup implements Serializable
* Returns the exact serialized size of column group.
* This can be used for example for buffer preallocation.
*
- * @return
+ * @return exact serialized size for column group
*/
public abstract long getExactSizeOnDisk();
/**
* Get the value at a global row/column position.
*
- * @param r
- * @param c
- * @return
+ * @param r row
+ * @param c column
+ * @return value at the row/column position
*/
public abstract double get(int r, int c);
@@ -219,6 +231,8 @@ public abstract class ColGroup implements Serializable
* vector to multiply by (tall vector)
* @param result
* accumulator for holding the result
+ * @param rl row lower
+ * @param ru row upper
* @throws DMLRuntimeException
* if the internal SystemML code that performs the
* multiplication experiences an error
@@ -232,9 +246,9 @@ public abstract class ColGroup implements Serializable
* row vector on the left (the original column vector is assumed to be
* transposed already i.e. its size now is 1xn).
*
- * @param vector
- * @param result
- * @throws DMLRuntimeException
+ * @param vector row vector
+ * @param result matrix block result
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract void leftMultByRowVector(MatrixBlock vector,
MatrixBlock result) throws DMLRuntimeException;
@@ -246,23 +260,18 @@ public abstract class ColGroup implements Serializable
* @param op
* operation to perform
* @return version of this column group with the operation applied
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract ColGroup scalarOperation(ScalarOperator op)
throws DMLRuntimeException;
- /**
- *
- * @param op
- * @param result
- * @throws DMLUnsupportedOperationException
- * @throws DMLRuntimeException
- */
public abstract void unaryAggregateOperations(AggregateUnaryOperator op, MatrixBlock result)
throws DMLRuntimeException;
/**
+ * Count the number of non-zeros per row
*
- * @param rnnz
+ * @param rnnz non-zeros per row
* @param rl row lower bound, inclusive
* @param ru row upper bound, exclusive
*/
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ColGroupBitmap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ColGroupBitmap.java b/src/main/java/org/apache/sysml/runtime/compress/ColGroupBitmap.java
index bc57f3d..a9fdc0f 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ColGroupBitmap.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ColGroupBitmap.java
@@ -63,7 +63,7 @@ public abstract class ColGroupBitmap extends ColGroup
/** Distinct values associated with individual bitmaps. */
protected double[] _values; //linearized <numcol vals> <numcol vals>
- /** Bitmaps, one per uncompressed value in {@link #values}. */
+ /** Bitmaps, one per uncompressed value in {@link #_values}. */
protected int[] _ptr; //bitmap offsets per value
protected char[] _data; //linearized bitmaps (variable length)
protected boolean _zeros; //contains zero values
@@ -77,6 +77,7 @@ public abstract class ColGroupBitmap extends ColGroup
/**
* Main constructor. Stores the headers for the individual bitmaps.
*
+ * @param type column type
* @param colIndices
* indices (within the block) of the columns included in this
* column
@@ -107,10 +108,12 @@ public abstract class ColGroupBitmap extends ColGroup
/**
* Constructor for subclass methods that need to create shallow copies
*
+ * @param type compression type
* @param colIndices
* raw column index information
* @param numRows
* number of rows in the block
+ * @param zeros ?
* @param values
* set of distinct values for the block (associated bitmaps are
* kept in the subclass)
@@ -125,14 +128,6 @@ public abstract class ColGroupBitmap extends ColGroup
return _ptr[k+1] - _ptr[k];
}
-
-
- /**
- *
- * @param numVals
- * @param totalLen
- * @param lbitmaps
- */
protected void createCompressedBitmaps(int numVals, int totalLen, char[][] lbitmaps)
{
// compact bitmaps to linearized representation
@@ -300,23 +295,10 @@ public abstract class ColGroupBitmap extends ColGroup
}
return 0;
}
-
- /**
- *
- * @param op
- * @param result
- * @param rl
- * @param ru
- * @throws DMLRuntimeException
- */
+
public abstract void unaryAggregateOperations(AggregateUnaryOperator op, MatrixBlock result, int rl, int ru)
throws DMLRuntimeException;
-
- /**
- *
- * @param bitmapIx
- * @return
- */
+
protected final double sumValues(int bitmapIx)
{
final int numCols = getNumCols();
@@ -342,12 +324,7 @@ public abstract class ColGroupBitmap extends ColGroup
return val;
}
-
- /**
- *
- * @param b
- * @param c
- */
+
protected final void sumAllValues(double[] b, double[] c)
{
final int numVals = getNumValues();
@@ -359,12 +336,6 @@ public abstract class ColGroupBitmap extends ColGroup
LinearAlgebraUtils.vectMultiplyAdd(b[i], _values, c, off, 0, numVals);
}
- /**
- *
- * @param bitmapIx
- * @param builtin
- * @return
- */
protected final double mxxValues(int bitmapIx, Builtin builtin)
{
final int numCols = getNumCols();
@@ -377,12 +348,6 @@ public abstract class ColGroupBitmap extends ColGroup
return val;
}
- /**
- *
- * @param numVals
- * @param sb
- * @return
- */
protected final double[] preaggValues(int numVals, double[] b) {
double[] ret = new double[numVals];
for( int k = 0; k < numVals; k++ )
@@ -398,7 +363,7 @@ public abstract class ColGroupBitmap extends ColGroup
* @param op
* scalar operation to perform
* @return transformed copy of value metadata for this column group
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected double[] applyScalarOp(ScalarOperator op)
throws DMLRuntimeException
@@ -411,15 +376,7 @@ public abstract class ColGroupBitmap extends ColGroup
return ret;
}
-
- /**
- *
- * @param op
- * @param newVal
- * @param numCols
- * @return
- * @throws DMLRuntimeException
- */
+
protected double[] applyScalarOp(ScalarOperator op, double newVal, int numCols)
throws DMLRuntimeException
{
@@ -438,8 +395,8 @@ public abstract class ColGroupBitmap extends ColGroup
/**
* NOTE: Shared across OLE/RLE because value-only computation.
*
- * @param result
- * @throws DMLRuntimeException
+ * @param result matrix block
+ * @param builtin ?
*/
protected void computeMxx(MatrixBlock result, Builtin builtin)
{
@@ -463,7 +420,8 @@ public abstract class ColGroupBitmap extends ColGroup
/**
* NOTE: Shared across OLE/RLE because value-only computation.
*
- * @param result
+ * @param result matrix block
+ * @param builtin ?
*/
protected void computeColMxx(MatrixBlock result, Builtin builtin)
{
@@ -490,6 +448,8 @@ public abstract class ColGroupBitmap extends ColGroup
/**
+ * Obtain number of distrinct sets of values associated with the bitmaps in this column group.
+ *
* @return the number of distinct sets of values associated with the bitmaps
* in this column group
*/
@@ -497,18 +457,10 @@ public abstract class ColGroupBitmap extends ColGroup
return _values.length / _colIndexes.length;
}
- /**
- *
- * @return
- */
public double[] getValues() {
return _values;
}
-
- /**
- *
- * @return
- */
+
public char[] getBitmaps() {
return _data;
}
@@ -522,9 +474,9 @@ public abstract class ColGroupBitmap extends ColGroup
}
/**
- * @param bmpIx
+ * @param k
* index of a specific compressed bitmap (stored in subclass,
- * index same as {@link #values})
+ * index same as {@link #getValues})
* @return an object for iterating over the row offsets in this bitmap. Only
* valid until the next call to this method. May be reused across
* calls.
@@ -536,9 +488,9 @@ public abstract class ColGroupBitmap extends ColGroup
/**
* Utility function of sparse-unsafe operations.
*
- * @param ind
- * @return
- * @throws DMLRuntimeException
+ * @param ind ?
+ * @return offsets
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected int[] computeOffsets(boolean[] ind)
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ColGroupOLE.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ColGroupOLE.java b/src/main/java/org/apache/sysml/runtime/compress/ColGroupOLE.java
index fcfecde..696adf2 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ColGroupOLE.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ColGroupOLE.java
@@ -97,9 +97,6 @@ public class ColGroupOLE extends ColGroupBitmap
}
}
- /**
- * Constructor for internal use.
- */
public ColGroupOLE(int[] colIndices, int numRows, boolean zeros, double[] values, char[] bitmaps, int[] bitmapOffs) {
super(CompressionType.OLE_BITMAP, colIndices, numRows, zeros, values);
_data = bitmaps;
@@ -467,11 +464,7 @@ public class ColGroupOLE extends ColGroupBitmap
computeColMxx(result, builtin);
}
}
-
- /**
- *
- * @param result
- */
+
private void computeSum(MatrixBlock result, KahanFunction kplus)
{
KahanObject kbuff = new KahanObject(result.quickGetValue(0, 0), result.quickGetValue(0, 1));
@@ -499,11 +492,7 @@ public class ColGroupOLE extends ColGroupBitmap
result.quickSetValue(0, 0, kbuff._sum);
result.quickSetValue(0, 1, kbuff._correction);
}
-
- /**
- *
- * @param result
- */
+
private void computeRowSums(MatrixBlock result, KahanFunction kplus, int rl, int ru)
{
KahanObject kbuff = new KahanObject(0, 0);
@@ -537,11 +526,7 @@ public class ColGroupOLE extends ColGroupBitmap
}
}
}
-
- /**
- *
- * @param result
- */
+
private void computeColSums(MatrixBlock result, KahanFunction kplus)
{
KahanObject kbuff = new KahanObject(0, 0);
@@ -569,12 +554,7 @@ public class ColGroupOLE extends ColGroupBitmap
}
}
}
-
-
- /**
- *
- * @param result
- */
+
private void computeRowMxx(MatrixBlock result, Builtin builtin, int rl, int ru)
{
//NOTE: zeros handled once for all column groups outside
@@ -606,8 +586,8 @@ public class ColGroupOLE extends ColGroupBitmap
/**
* Utility function of sparse-unsafe operations.
*
- * @return
- * @throws DMLRuntimeException
+ * @return zero indicator vector
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private boolean[] computeZeroIndicatorVector()
throws DMLRuntimeException
@@ -681,11 +661,11 @@ public class ColGroupOLE extends ColGroupBitmap
/**
* Scans to given row_lower position by exploiting any existing
* skip list and scanning segment length fields. Returns array
- * of positions for all values;
+ * of positions for all values.
*
- * @param numVals
- * @param rl
- * @return
+ * @param numVals number of values
+ * @param rl row lower position
+ * @return array of positions for all values
*/
private int[] skipScan(int numVals, int rl) {
int[] ret = new int[numVals];
@@ -708,13 +688,7 @@ public class ColGroupOLE extends ColGroupBitmap
return ret;
}
-
- /**
- *
- * @param k
- * @param rl
- * @return
- */
+
private int skipScanVal(int k, int rl) {
final int blksz = BitmapEncoder.BITMAP_BLOCK_SZ;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ColGroupRLE.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ColGroupRLE.java b/src/main/java/org/apache/sysml/runtime/compress/ColGroupRLE.java
index 35b876b..efdcc86 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ColGroupRLE.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ColGroupRLE.java
@@ -77,9 +77,6 @@ public class ColGroupRLE extends ColGroupBitmap
createCompressedBitmaps(numVals, totalLen, lbitmaps);
}
- /**
- * Constructor for internal use.
- */
public ColGroupRLE(int[] colIndices, int numRows, boolean zeros, double[] values, char[] bitmaps, int[] bitmapOffs) {
super(CompressionType.RLE_BITMAP, colIndices, numRows, zeros, values);
_data = bitmaps;
@@ -476,11 +473,7 @@ public class ColGroupRLE extends ColGroupBitmap
computeColMxx(result, builtin);
}
}
-
- /**
- *
- * @param result
- */
+
private void computeSum(MatrixBlock result, KahanFunction kplus)
{
KahanObject kbuff = new KahanObject(result.quickGetValue(0, 0), result.quickGetValue(0, 1));
@@ -508,11 +501,7 @@ public class ColGroupRLE extends ColGroupBitmap
result.quickSetValue(0, 0, kbuff._sum);
result.quickSetValue(0, 1, kbuff._correction);
}
-
- /**
- *
- * @param result
- */
+
private void computeRowSums(MatrixBlock result, KahanFunction kplus, int rl, int ru)
{
KahanObject kbuff = new KahanObject(0, 0);
@@ -542,11 +531,7 @@ public class ColGroupRLE extends ColGroupBitmap
}
}
}
-
- /**
- *
- * @param result
- */
+
private void computeColSums(MatrixBlock result, KahanFunction kplus)
{
KahanObject kbuff = new KahanObject(0, 0);
@@ -575,12 +560,7 @@ public class ColGroupRLE extends ColGroupBitmap
}
}
}
-
- /**
- *
- * @param result
- */
private void computeRowMxx(MatrixBlock result, Builtin builtin, int rl, int ru)
{
//NOTE: zeros handled once for all column groups outside
@@ -665,10 +645,10 @@ public class ColGroupRLE extends ColGroupBitmap
* fields. Returns array of positions for all values and modifies
* given array of start positions for all values too.
*
- * @param numVals
- * @param rl
- * @param astart
- * @return
+ * @param numVals number of values
+ * @param rl lower row position
+ * @param astart start positions
+ * @return array of positions for all values
*/
private int[] skipScan(int numVals, int rl, int[] astart) {
int[] apos = new int[numVals];
@@ -694,13 +674,7 @@ public class ColGroupRLE extends ColGroupBitmap
return apos;
}
-
- /**
- *
- * @param k
- * @param rl
- * @return
- */
+
private Pair<Integer,Integer> skipScanVal(int k, int rl) {
int apos = 0;
int astart = 0;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ColGroupUncompressed.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ColGroupUncompressed.java b/src/main/java/org/apache/sysml/runtime/compress/ColGroupUncompressed.java
index 085244c..9d06bf8 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ColGroupUncompressed.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ColGroupUncompressed.java
@@ -65,7 +65,7 @@ public class ColGroupUncompressed extends ColGroup
* @param rawblock
* the uncompressed block; uncompressed data must be present at
* the time that the constructor is called
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unused")
public ColGroupUncompressed(List<Integer> colIndicesList, MatrixBlock rawblock)
@@ -148,8 +148,7 @@ public class ColGroupUncompressed extends ColGroup
* column mapping for this column group
* @param numRows
* number of rows in the column, for passing to the superclass
- * @param colContents
- * uncompressed cell values
+ * @param data matrix block
*/
public ColGroupUncompressed(int[] colIndices, int numRows, MatrixBlock data)
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/CompressedMatrixBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/CompressedMatrixBlock.java b/src/main/java/org/apache/sysml/runtime/compress/CompressedMatrixBlock.java
index 16d03b5..50cc8a5 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/CompressedMatrixBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/CompressedMatrixBlock.java
@@ -136,6 +136,8 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
* "Copy" constructor to populate this compressed block with the
* uncompressed contents of a conventional block. Does <b>not</b> compress
* the block.
+ *
+ * @param mb matrix block
*/
public CompressedMatrixBlock(MatrixBlock mb) {
super(mb.getNumRows(), mb.getNumColumns(), mb.isInSparseFormat());
@@ -149,6 +151,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
/**
+ * Obtain the column groups.
*
* @return the column groups constructed by the compression process.
*
@@ -158,17 +161,15 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
/**
+ * Obtain whether this block is in compressed form or not.
+ *
* @return true if this block is in compressed form; false if the block has
* not yet been compressed
*/
public boolean isCompressed() {
return (_colGroups != null);
}
-
- /**
- *
- * @return
- */
+
public boolean isSingleUncompressedGroup(){
return (_colGroups!=null && _colGroups.size()==1
&& _colGroups.get(0) instanceof ColGroupUncompressed);
@@ -193,7 +194,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
*
* +per column sparsity
*
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void compress()
throws DMLRuntimeException
@@ -203,9 +204,10 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
/**
+ * Compress block.
*
* @param k number of threads
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void compress(int k)
throws DMLRuntimeException
@@ -343,27 +345,13 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
return _stats;
}
- /**
- *
- * @param estim
- * @param clen
- * @return
- */
private static CompressedSizeInfo[] computeCompressedSizeInfos(CompressedSizeEstimator estim, int clen) {
CompressedSizeInfo[] ret = new CompressedSizeInfo[clen];
for( int col=0; col<clen; col++ )
ret[col] = estim.estimateCompressedColGroupSize(new int[] { col });
return ret;
}
-
- /**
- *
- * @param estim
- * @param clen
- * @param k
- * @return
- * @throws DMLRuntimeException
- */
+
private static CompressedSizeInfo[] computeCompressedSizeInfos(CompressedSizeEstimator estim, int clen, int k)
throws DMLRuntimeException
{
@@ -384,15 +372,6 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
}
- /**
- *
- * @param in
- * @param estim
- * @param compRatios
- * @param rlen
- * @param groups
- * @return
- */
private static ColGroup[] compressColGroups(MatrixBlock in, CompressedSizeEstimator estim, HashMap<Integer, Double> compRatios, int rlen, double sp, List<int[]> groups)
{
ColGroup[] ret = new ColGroup[groups.size()];
@@ -401,18 +380,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
return ret;
}
-
- /**
- *
- * @param in
- * @param estim
- * @param compRatios
- * @param rlen
- * @param groups
- * @param k
- * @return
- * @throws DMLRuntimeException
- */
+
private static ColGroup[] compressColGroups(MatrixBlock in, CompressedSizeEstimator estim, HashMap<Integer, Double> compRatios, int rlen, double sp, List<int[]> groups, int k)
throws DMLRuntimeException
{
@@ -432,16 +400,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
throw new DMLRuntimeException(ex);
}
}
-
- /**
- *
- * @param in
- * @param estim
- * @param compRatios
- * @param rlen
- * @param colIndexes
- * @return
- */
+
private static ColGroup compressColGroup(MatrixBlock in, CompressedSizeEstimator estim, HashMap<Integer, Double> compRatios, int rlen, double sp, int[] colIndexes)
{
int[] allGroupIndices = null;
@@ -504,9 +463,10 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
/**
* Compute a conservative estimate of the uncompressed size of a column group.
*
- * @param rlen
- * @param clen
- * @return
+ * @param rlen row length
+ * @param clen column length
+ * @param sparsity the sparsity
+ * @return estimate of uncompressed size of column group
*/
private static double getUncompressedSize(int rlen, int clen, double sparsity) {
//we estimate the uncompressed size as 8 * nnz in order to cover both
@@ -516,8 +476,11 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
/**
+ * Decompress block.
+ *
* @return a new uncompressed matrix block containing the contents of this
* block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MatrixBlock decompress() throws DMLRuntimeException
{
@@ -555,10 +518,12 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
/**
+ * Decompress block.
+ *
* @param k degree of parallelism
* @return a new uncompressed matrix block containing the contents
* of this block
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MatrixBlock decompress(int k) throws DMLRuntimeException
{
@@ -602,6 +567,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
/**
+ * Obtain an upper bound on the memory used to store the compressed block.
*
* @return an upper bound on the memory used to store this compressed block
* considering class overhead.
@@ -759,8 +725,8 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
* Redirects the default java serialization via externalizable to our default
* hadoop writable serialization for efficient broadcast/rdd deserialization.
*
- * @param is
- * @throws IOException
+ * @param is object input
+ * @throws IOException if IOException occurs
*/
@Override
public void readExternal(ObjectInput is)
@@ -773,8 +739,8 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
* Redirects the default java serialization via externalizable to our default
* hadoop writable serialization for efficient broadcast/rdd serialization.
*
- * @param is
- * @throws IOException
+ * @param os object output
+ * @throws IOException if IOException occurs
*/
@Override
public void writeExternal(ObjectOutput os)
@@ -1259,10 +1225,10 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
/**
* Multi-threaded version of rightMultByVector.
*
- * @param vector
- * @param result
- * @param k
- * @throws DMLRuntimeException
+ * @param vector matrix block vector
+ * @param result matrix block result
+ * @param k number of threads
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void rightMultByVector(MatrixBlock vector, MatrixBlock result, int k)
throws DMLRuntimeException
@@ -1295,11 +1261,14 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
* Multiply this matrix block by the transpose of a column vector (i.e.
* t(v)%*%X)
*
+ * @param colGroups list of column groups
* @param vector
* left-hand operand of the multiplication
* @param result
* buffer to hold the result; must have the appropriate size
* already
+ * @param doTranspose if true, transpose vector
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void leftMultByVectorTranspose(List<ColGroup> colGroups, MatrixBlock vector, MatrixBlock result, boolean doTranspose)
throws DMLRuntimeException
@@ -1327,11 +1296,15 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
/**
* Multi-thread version of leftMultByVectorTranspose.
*
+ * @param colGroups list of column groups
* @param vector
+ * left-hand operand of the multiplication
* @param result
- * @param doTranspose
- * @param k
- * @throws DMLRuntimeException
+ * buffer to hold the result; must have the appropriate size
+ * already
+ * @param doTranspose if true, transpose vector
+ * @param k number of threads
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private static void leftMultByVectorTranspose(List<ColGroup> colGroups,MatrixBlock vector, MatrixBlock result, boolean doTranspose, int k)
throws DMLRuntimeException
@@ -1366,14 +1339,6 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
result.recomputeNonZeros();
}
- /**
- *
- * @param groups
- * @param result
- * @param gl
- * @param gu
- * @throws DMLRuntimeException
- */
private static void leftMultByTransposeSelf(ArrayList<ColGroup> groups, MatrixBlock result, int gl, int gu)
throws DMLRuntimeException
{
@@ -1410,12 +1375,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
}
}
}
-
- /**
- *
- * @param k
- * @return
- */
+
@SuppressWarnings("unchecked")
private ArrayList<ColGroup>[] createStaticTaskPartitioning(int k, boolean inclUncompressed)
{
@@ -1440,11 +1400,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
return grpParts;
}
-
- /**
- *
- * @return
- */
+
private ColGroupUncompressed getUncompressedColGroup()
{
for( ColGroup grp : _colGroups )
@@ -1453,10 +1409,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
return null;
}
-
- /**
- *
- */
+
private static class LeftMatrixMultTask implements Callable<Object>
{
private ColGroup _group = null;
@@ -1482,10 +1435,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
return null;
}
}
-
- /**
- *
- */
+
private static class RightMatrixMultTask implements Callable<Object>
{
private ArrayList<ColGroup> _groups = null;
@@ -1571,10 +1521,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
return _ret;
}
}
-
- /**
- *
- */
+
private static class SizeEstimTask implements Callable<CompressedSizeInfo>
{
private CompressedSizeEstimator _estim = null;
@@ -1590,10 +1537,7 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
return _estim.estimateCompressedColGroupSize(new int[] { _col });
}
}
-
- /**
- *
- */
+
private static class CompressTask implements Callable<ColGroup>
{
private MatrixBlock _in = null;
@@ -2041,43 +1985,23 @@ public class CompressedMatrixBlock extends MatrixBlock implements Externalizable
throw new RuntimeException("CompressedMatrixBlock: seqOperationsInPlace not supported.");
}
- /**
- *
- * @param mb
- * @return
- */
private static boolean isCompressed(MatrixBlock mb) {
return (mb instanceof CompressedMatrixBlock && ((CompressedMatrixBlock)mb).isCompressed());
}
-
- /**
- *
- * @param mVal
- * @return
- * @throws DMLRuntimeException
- */
+
private static MatrixBlock getUncompressed(MatrixValue mVal)
throws DMLRuntimeException {
return isCompressed((MatrixBlock)mVal) ?
((CompressedMatrixBlock)mVal).decompress() :
(MatrixBlock)mVal;
}
-
- /**
- *
- * @param operation
- */
+
private void printDecompressWarning(String operation) {
if( isCompressed() ) {
LOG.warn("Operation '"+operation+"' not supported yet - decompressing for ULA operations.");
}
}
-
- /**
- *
- * @param operation
- * @param m2
- */
+
private void printDecompressWarning(String operation, MatrixBlock m2) {
if( isCompressed() || isCompressed(m2) ) {
LOG.warn("Operation '"+operation+"' not supported yet - decompressing for ULA operations.");
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/PlanningBinPacker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/PlanningBinPacker.java b/src/main/java/org/apache/sysml/runtime/compress/PlanningBinPacker.java
index 2764664..7c3d8d2 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/PlanningBinPacker.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/PlanningBinPacker.java
@@ -73,12 +73,6 @@ public class PlanningBinPacker
return packFirstFit(shuffledItems, shuffledWeights);
}
- /**
- *
- * @param items
- * @param itemWeights
- * @return
- */
private TreeMap<Float, List<List<Integer>>> packFirstFit(List<Integer> items, List<Float> itemWeights)
{
// when searching for a bin, the first bin in the list is used
@@ -123,7 +117,7 @@ public class PlanningBinPacker
/**
* NOTE: upper bound is 11/9 OPT + 6/9 (~1.22 OPT)
*
- * @return
+ * @return sorted map of ?
*/
public TreeMap<Float, List<List<Integer>>> packFirstFitDescending() {
// sort items descending based on their weights
@@ -149,27 +143,18 @@ public class PlanningBinPacker
/**
* NOTE: upper bound is 71/60 OPT + 6/9 (~1.18 OPT)
*
- * @return
+ * @return sorted map of ?
*/
public TreeMap<Float, List<List<Integer>>> packModifiedFirstFitDescending() {
throw new UnsupportedOperationException("Not implemented yet!");
}
- /**
- *
- * @return
- */
private List<List<Integer>> createBinList() {
List<List<Integer>> binList = new ArrayList<List<Integer>>();
binList.add(new ArrayList<Integer>());
return binList;
}
- /**
- *
- * @param item
- * @return
- */
private List<List<Integer>> createBinList(int item) {
List<List<Integer>> binList = new ArrayList<List<Integer>>();
List<Integer> bin = new ArrayList<Integer>();
@@ -178,11 +163,6 @@ public class PlanningBinPacker
return binList;
}
- /**
- *
- * @param bin
- * @return
- */
private List<List<Integer>> createBinList(List<Integer> bin) {
List<List<Integer>> binList = new ArrayList<List<Integer>>();
binList.add(bin);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCoder.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCoder.java b/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCoder.java
index 711f383..9313cd9 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCoder.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCoder.java
@@ -38,18 +38,7 @@ public class PlanningCoCoder
private final static float GROUPABILITY_THRESHOLD = 0.00064f;
private final static float PARTITION_WEIGHT = 0.05F; //higher values lead to more grouping
private final static float PARTITION_SIZE = PARTITION_WEIGHT * GROUPABILITY_THRESHOLD;
-
- /**
- *
- * @param sizeEstimator
- * @param availCols
- * @param colsCardinalities
- * @param compressedSize
- * @param numRows
- * @param sparsity
- * @return
- * @throws DMLRuntimeException
- */
+
public static List<int[]> findCocodesByPartitioning(CompressedSizeEstimator sizeEstimator, List<Integer> availCols,
List<Integer> colsCardinalities, List<Long> compressedSize, int numRows, double sparsity, int k)
throws DMLRuntimeException
@@ -88,15 +77,7 @@ public class PlanningCoCoder
return retGroups;
}
-
- /**
- *
- * @param bins
- * @param groupColsInfo
- * @param estim
- * @param rlen
- * @return
- */
+
private static List<int[]> getCocodingGroupsBruteForce(TreeMap<Float, List<List<Integer>>> bins, HashMap<Integer, GroupableColInfo> groupColsInfo, CompressedSizeEstimator estim, int rlen)
{
List<int[]> retGroups = new ArrayList<int[]>();
@@ -116,17 +97,7 @@ public class PlanningCoCoder
return retGroups;
}
-
- /**
- *
- * @param bins
- * @param groupColsInfo
- * @param estim
- * @param rlen
- * @param k
- * @return
- * @throws DMLRuntimeException
- */
+
private static List<int[]> getCocodingGroupsBruteForce(TreeMap<Float, List<List<Integer>>> bins, HashMap<Integer, GroupableColInfo> groupColsInfo, CompressedSizeEstimator estim, int rlen, int k)
throws DMLRuntimeException
{
@@ -160,6 +131,10 @@ public class PlanningCoCoder
* pairs of column groups into larger groups. Each phase of the greedy
* algorithm considers all combinations of pairs to merge.
*
+ * @param sizeEstimator compressed size estimator
+ * @param numRowsWeight number of rows weight
+ * @param singltonGroups planning co-coding groups
+ * @return
*/
private static PlanningCoCodingGroup[] findCocodesBruteForce(
CompressedSizeEstimator sizeEstimator, float numRowsWeight,
@@ -235,24 +210,12 @@ public class PlanningCoCoder
return colGroups;
}
- /**
- *
- * @param numRows
- * @param sparsity
- * @return
- */
private static float computeWeightForCoCoding(int numRows, double sparsity) {
//we use a constant partition size (independent of the number of rows
//in order to ensure constant compression speed independent of blocking)
return PARTITION_SIZE;
}
-
- /**
- *
- * @param arr
- * @param val
- * @return
- */
+
private static int findInArray(Object[] arr, Object val) {
for (int i = 0; i < arr.length; i++) {
if (arr[i].equals(val)) {
@@ -261,10 +224,7 @@ public class PlanningCoCoder
}
return -1;
}
-
- /**
- *
- */
+
protected static class GroupableColInfo {
float cardRatio;
long size;
@@ -274,10 +234,7 @@ public class PlanningCoCoder
size = lsize;
}
}
-
- /**
- *
- */
+
private static class CocodeTask implements Callable<PlanningCoCodingGroup[]>
{
private CompressedSizeEstimator _estim = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCodingGroup.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCodingGroup.java b/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCodingGroup.java
index a1e0123..9ee0d7e 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCodingGroup.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/PlanningCoCodingGroup.java
@@ -38,6 +38,8 @@ public class PlanningCoCodingGroup
/**
* Constructor for a one-column group; i.e. do not co-code a given column.
*
+ * @param col column
+ * @param info groupable column info
*/
public PlanningCoCodingGroup(int col, GroupableColInfo info) {
_colIndexes = new int[]{col};
@@ -50,6 +52,7 @@ public class PlanningCoCodingGroup
*
* @param grp1 first group of columns to merge
* @param grp2 second group to merge
+ * @param bitmapSizeEstimator bitmap size estimator
* @param numRowsWeight numRows x sparsity
*/
public PlanningCoCodingGroup(PlanningCoCodingGroup grp1, PlanningCoCodingGroup grp2,
@@ -88,6 +91,8 @@ public class PlanningCoCodingGroup
}
/**
+ * Obtain estimated compressed size of the grouped columns.
+ *
* @return estimated compressed size of the grouped columns
*/
public long getEstSize() {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelection.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelection.java b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelection.java
index bd3c13c..fdd0f78 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelection.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelection.java
@@ -42,14 +42,10 @@ public abstract class ReaderColumnSelection
/**
* Gets the next row, null when no more rows.
*
- * @return
+ * @return next row
*/
public abstract DblArray nextRow();
- /**
- *
- * @return
- */
public int getCurrentRowIndex() {
return _lastRow;
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDense.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDense.java b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDense.java
index c39eeef..8d2682f 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDense.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDense.java
@@ -50,10 +50,6 @@ public class ReaderColumnSelectionDense extends ReaderColumnSelection
}
}
- /**
- *
- * @return
- */
private DblArray getNextRow() {
if(_lastRow == _numRows-1)
return null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDenseSample.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDenseSample.java b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDenseSample.java
index d8e50c0..f60b3a7 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDenseSample.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionDenseSample.java
@@ -58,10 +58,6 @@ public class ReaderColumnSelectionDenseSample extends ReaderColumnSelection
}
}
- /**
- *
- * @return
- */
private DblArray getNextRow() {
if (lastIndex == _sampleIndexes.length - 1)
return null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionSparse.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionSparse.java b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionSparse.java
index c6adaee..63c0467 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionSparse.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/ReaderColumnSelectionSparse.java
@@ -77,10 +77,6 @@ public class ReaderColumnSelectionSparse extends ReaderColumnSelection
}
}
- /**
- *
- * @return
- */
private DblArray getNextRow()
{
if(_lastRow == _numRows-1)
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/UncompressedBitmap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/UncompressedBitmap.java b/src/main/java/org/apache/sysml/runtime/compress/UncompressedBitmap.java
index 04137ae..d62bae9 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/UncompressedBitmap.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/UncompressedBitmap.java
@@ -75,6 +75,8 @@ public final class UncompressedBitmap
}
/**
+ * Obtain tuple of column values associated with index.
+ *
* @param ix index of a particular distinct value
* @return the tuple of column values associated with the specified index
*/
@@ -83,6 +85,8 @@ public final class UncompressedBitmap
}
/**
+ * Obtain number of distinct values in the column.
+ *
* @return number of distinct values in the column; this number is also the
* number of bitmaps, since there is one bitmap per value
*/
@@ -91,6 +95,8 @@ public final class UncompressedBitmap
}
/**
+ * Obtain array of offsets of the rows containing index value
+ *
* @param ix index of a particular distinct value
* @return IMMUTABLE array of the offsets of the rows containing the value
* with the indicated index
@@ -98,11 +104,7 @@ public final class UncompressedBitmap
public int[] getOffsetsList(int ix) {
return _offsetsLists[ix];
}
-
- /**
- *
- * @return
- */
+
public int getNumOffsets() {
int ret = 0;
for( int[] offlist : _offsetsLists )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimator.java b/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimator.java
index 8d0a40b..2b49403 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimator.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimator.java
@@ -34,26 +34,10 @@ public abstract class CompressedSizeEstimator
_data = data;
}
- /**
- *
- * @param colIndexes
- * @return
- */
public abstract CompressedSizeInfo estimateCompressedColGroupSize(int[] colIndexes);
- /**
- *
- * @param ubm
- * @return
- */
public abstract CompressedSizeInfo estimateCompressedColGroupSize(UncompressedBitmap ubm);
- /**
- *
- * @param ubm
- * @param inclRLE
- * @return
- */
protected SizeEstimationFactors computeSizeEstimationFactors(UncompressedBitmap ubm, boolean inclRLE) {
int numVals = ubm.getNumValues();
int numRuns = 0;
@@ -85,10 +69,10 @@ public abstract class CompressedSizeEstimator
* Estimates the number of bytes needed to encode this column group
* in RLE encoding format.
*
- * @param numVals
- * @param numRuns
- * @param numCols
- * @return
+ * @param numVals number of value tuples
+ * @param numRuns number of runs
+ * @param numCols number of columns
+ * @return number of bytes to encode column group in RLE format
*/
protected static long getRLESize(int numVals, int numRuns, int numCols) {
int ret = 0;
@@ -105,11 +89,11 @@ public abstract class CompressedSizeEstimator
* Estimates the number of bytes needed to encode this column group
* in OLE format.
*
- * @param numVals
- * @param numOffs
- * @param numSeqs
- * @param numCols
- * @return
+ * @param numVals number of value tuples
+ * @param numOffs number of offsets
+ * @param numSeqs number of segment headers
+ * @param numCols number of columns
+ * @return number of bytes to encode column group in RLE format
*/
protected static long getOLESize(int numVals, float numOffs, int numSeqs, int numCols) {
int ret = 0;
@@ -123,10 +107,7 @@ public abstract class CompressedSizeEstimator
ret += 2 * numSeqs;
return ret;
}
-
- /**
- *
- */
+
protected static class SizeEstimationFactors {
protected int numVals; //num value tuples
protected int numSegs; //num OLE segments
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimatorSample.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimatorSample.java b/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimatorSample.java
index fb5949e..72456f6 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimatorSample.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/estim/CompressedSizeEstimatorSample.java
@@ -47,12 +47,7 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
private int[] _sampleRows = null;
private RandomDataGenerator _rng = null;
private int _numRows = -1;
-
- /**
- *
- * @param data
- * @param sampleRows
- */
+
public CompressedSizeEstimatorSample(MatrixBlock data, int[] sampleRows) {
super(data);
_sampleRows = sampleRows;
@@ -61,17 +56,13 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
_data.getNumColumns() : _data.getNumRows();
}
- /**
- *
- * @param mb
- * @param sampleSize
- */
public CompressedSizeEstimatorSample(MatrixBlock mb, int sampleSize) {
this(mb, null);
_sampleRows = getSortedUniformSample(_numRows, sampleSize);
}
/**
+ * set the sample rows (assumed to be sorted)
*
* @param sampleRows, assumed to be sorted
*/
@@ -79,10 +70,6 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
_sampleRows = sampleRows;
}
- /**
- *
- * @param sampleSize
- */
public void resampleRows(int sampleSize) {
_sampleRows = getSortedUniformSample(_numRows, sampleSize);
}
@@ -148,23 +135,11 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
getRLESize(fact.numVals, fact.numRuns, ubm.getNumColumns()),
getOLESize(fact.numVals, fact.numOffs, fact.numSegs, ubm.getNumColumns()));
}
-
- /**
- *
- * @param colIndexes
- * @return
- */
+
private int getNumDistinctValues(int[] colIndexes) {
return haasAndStokes(colIndexes);
}
- /**
- *
- * @param sampleUncompressedBitmap
- * @param sampleSize
- * @param totalNumRows
- * @return
- */
private int getNumRuns(UncompressedBitmap sampleUncompressedBitmap,
int sampleSize, int totalNumRows) {
int numVals = sampleUncompressedBitmap.getNumValues();
@@ -328,11 +303,6 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
return Math.round(numRuns);
}
- /**
- *
- * @param colIndexes
- * @return
- */
private int haasAndStokes(int[] colIndexes) {
ReaderColumnSelection reader = new ReaderColumnSelectionDenseSample(_data,
colIndexes, _sampleRows, !CompressedMatrixBlock.MATERIALIZE_ZEROS);
@@ -342,8 +312,8 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
/**
* TODO remove, just for local debugging.
*
- * @param colIndexes
- * @return
+ * @param colIndexes column indexes
+ * @return exact number of district values
*/
@SuppressWarnings("unused")
private int getExactNumDistinctValues(int[] colIndexes) {
@@ -360,9 +330,9 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
/**
* Returns a sorted array of n integers, drawn uniformly from the range [0,range).
*
- * @param range
- * @param smplSize
- * @return
+ * @param range the range
+ * @param smplSize sample size
+ * @return sorted array of integers
*/
private int[] getSortedUniformSample(int range, int smplSize) {
if (smplSize == 0)
@@ -381,11 +351,11 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
* M. Charikar, S. Chaudhuri, R. Motwani, and V. R. Narasayya, Towards
* estimation error guarantees for distinct values, PODS'00.
*
- * @param nRows
- * @param sampleSize
+ * @param nRows number of rows
+ * @param sampleSize sample size
* @param sampleRowsReader
- * : a reader for the sampled rows
- * @return
+ * a reader for the sampled rows
+ * @return error estimator
*/
@SuppressWarnings("unused")
private static int guaranteedErrorEstimator(int nRows, int sampleSize,
@@ -409,10 +379,10 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
* Sampling-Based Estimation of the Number of Distinct Values of an
* Attribute. VLDB'95, Section 3.2.
*
- * @param nRows
- * @param sampleSize
- * @param sampleRowsReader
- * @return
+ * @param nRows number of rows
+ * @param sampleSize sample size
+ * @param sampleRowsReader reader
+ * @return estimator
*/
@SuppressWarnings("unused")
private static int shlosserEstimator(int nRows, int sampleSize,
@@ -422,14 +392,6 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
getValCounts(sampleRowsReader));
}
- /**
- *
- * @param nRows
- * @param sampleSize
- * @param sampleRowsReader
- * @param valsCount
- * @return
- */
private static int shlosserEstimator(int nRows, int sampleSize,
ReaderColumnSelection sampleRowsReader,
HashMap<DblArray, Integer> valsCount)
@@ -455,10 +417,10 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
* Sampling-Based Estimation of the Number of Distinct Values of an
* Attribute. VLDB'95, Section 4.3.
*
- * @param nRows
- * @param sampleSize
- * @param sampleRowsReader
- * @return
+ * @param nRows number of rows
+ * @param sampleSize sample size
+ * @param sampleRowsReader row reader
+ * @return estimator
*/
@SuppressWarnings("unused")
private static int smoothedJackknifeEstimator(int nRows, int sampleSize,
@@ -468,14 +430,6 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
getValCounts(sampleRowsReader));
}
- /**
- *
- * @param nRows
- * @param sampleSize
- * @param sampleRowsReader
- * @param valsCount
- * @return
- */
private static int smoothedJackknifeEstimator(int nRows, int sampleSize,
ReaderColumnSelection sampleRowsReader,
HashMap<DblArray, Integer> valsCount)
@@ -559,10 +513,10 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
* Sampling-Based Estimation of the Number of Distinct Values of an
* Attribute. VLDB'95, Section 5.2, recommended estimator by the authors
*
- * @param nRows
- * @param sampleSize
- * @param sampleRowsReader
- * @return
+ * @param nRows number of rows
+ * @param sampleSize sampel size
+ * @param sampleRowsReader row reader
+ * @return estimator
*/
@SuppressWarnings("unused")
private static int shlosserJackknifeEstimator(int nRows, int sampleSize,
@@ -611,10 +565,10 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
*
* The hybrid estimator given by Eq. 33 in Section 6
*
- * @param nRows
- * @param sampleSize
- * @param sampleRowsReader
- * @return
+ * @param nRows number of rows
+ * @param sampleSize sample size
+ * @param sampleRowsReader row reader
+ * @return estimator
*/
private static int haasAndStokes(int nRows, int sampleSize,
ReaderColumnSelection sampleRowsReader)
@@ -720,11 +674,6 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
return estimate < 1 ? 1 : estimate;
}
- /**
- *
- * @param sampleRowsReader
- * @return
- */
private static HashMap<DblArray, Integer> getValCounts(
ReaderColumnSelection sampleRowsReader)
{
@@ -741,11 +690,6 @@ public class CompressedSizeEstimatorSample extends CompressedSizeEstimator
return valsCount;
}
- /**
- *
- * @param valsCount
- * @return
- */
private static int[] getFreqCounts(HashMap<DblArray, Integer> valsCount)
{
int maxCount = 0;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/estim/SizeEstimatorFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/estim/SizeEstimatorFactory.java b/src/main/java/org/apache/sysml/runtime/compress/estim/SizeEstimatorFactory.java
index f857b5b..c142103 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/estim/SizeEstimatorFactory.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/estim/SizeEstimatorFactory.java
@@ -24,13 +24,7 @@ import org.apache.sysml.runtime.matrix.data.MatrixBlock;
public class SizeEstimatorFactory
{
public static final float SAMPLING_RATIO = 0.01f; //conservative default
-
- /**
- *
- * @param data
- * @param numRows
- * @return
- */
+
@SuppressWarnings("unused")
public static CompressedSizeEstimator getSizeEstimator(MatrixBlock data, int numRows) {
return (SAMPLING_RATIO == 1.0) ?
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/utils/ConverterUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/utils/ConverterUtils.java b/src/main/java/org/apache/sysml/runtime/compress/utils/ConverterUtils.java
index 68c60ba..f4d9f1c 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/utils/ConverterUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/utils/ConverterUtils.java
@@ -35,8 +35,8 @@ public class ConverterUtils
* Copy col group instance with deep copy of column indices but
* shallow copy of actual contents;
*
- * @param group
- * @return
+ * @param group column group
+ * @return column group (deep copy of indices but shallow copy of contents)
*/
public static ColGroup copyColGroup(ColGroup group)
{
@@ -63,12 +63,7 @@ public class ConverterUtils
return ret;
}
-
- /**
- *
- * @param vector
- * @return
- */
+
public static double[] getDenseVector( MatrixBlock vector )
{
if( vector.isInSparseFormat() )
@@ -76,12 +71,7 @@ public class ConverterUtils
else
return vector.getDenseBlock();
}
-
- /**
- *
- * @param group
- * @return
- */
+
public static MatrixBlock getUncompressedColBlock( ColGroup group )
{
MatrixBlock ret = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/utils/DblArray.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/utils/DblArray.java b/src/main/java/org/apache/sysml/runtime/compress/utils/DblArray.java
index 4e23037..74fae8b 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/utils/DblArray.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/utils/DblArray.java
@@ -68,11 +68,6 @@ public class DblArray
return Arrays.toString(_arr);
}
- /**
- *
- * @param ds
- * @return
- */
public static boolean isZero(double[] ds) {
for (int i = 0; i < ds.length; i++)
if (ds[i] != 0.0)
@@ -80,11 +75,6 @@ public class DblArray
return true;
}
- /**
- *
- * @param val
- * @return
- */
public static boolean isZero(DblArray val) {
return val._zero || isZero(val._arr);
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/utils/DblArrayIntListHashMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/utils/DblArrayIntListHashMap.java b/src/main/java/org/apache/sysml/runtime/compress/utils/DblArrayIntListHashMap.java
index dd5bbe7..7b39039 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/utils/DblArrayIntListHashMap.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/utils/DblArrayIntListHashMap.java
@@ -23,7 +23,7 @@ import java.util.ArrayList;
/**
* This class provides a memory-efficient replacement for
- * HashMap<DblArray,IntArrayList> for restricted use cases.
+ * {@code HashMap<DblArray,IntArrayList>} for restricted use cases.
*
*/
public class DblArrayIntListHashMap
@@ -40,19 +40,10 @@ public class DblArrayIntListHashMap
_size = 0;
}
- /**
- *
- * @return
- */
public int size() {
return _size;
}
- /**
- *
- * @param key
- * @return
- */
public IntArrayList get(DblArray key) {
// probe for early abort
if( _size == 0 )
@@ -72,11 +63,6 @@ public class DblArrayIntListHashMap
return null;
}
- /**
- *
- * @param key
- * @param value
- */
public void appendValue(DblArray key, IntArrayList value) {
// compute entry index position
int hash = hash(key);
@@ -93,10 +79,6 @@ public class DblArrayIntListHashMap
resize();
}
- /**
- *
- * @return
- */
public ArrayList<DArrayIListEntry> extractValues() {
ArrayList<DArrayIListEntry> ret = new ArrayList<DArrayIListEntry>();
for( DArrayIListEntry e : _data ) {
@@ -112,9 +94,6 @@ public class DblArrayIntListHashMap
return ret;
}
- /**
- *
- */
private void resize() {
// check for integer overflow on resize
if( _data.length > Integer.MAX_VALUE / RESIZE_FACTOR )
@@ -137,11 +116,6 @@ public class DblArrayIntListHashMap
}
}
- /**
- *
- * @param key
- * @return
- */
private static int hash(DblArray key) {
int h = key.hashCode();
@@ -152,19 +126,10 @@ public class DblArrayIntListHashMap
return h ^ (h >>> 7) ^ (h >>> 4);
}
- /**
- *
- * @param h
- * @param length
- * @return
- */
private static int indexFor(int h, int length) {
return h & (length - 1);
}
- /**
- *
- */
public class DArrayIListEntry {
public DblArray key;
public IntArrayList value;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/utils/DoubleIntListHashMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/utils/DoubleIntListHashMap.java b/src/main/java/org/apache/sysml/runtime/compress/utils/DoubleIntListHashMap.java
index 8424d11..639b785 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/utils/DoubleIntListHashMap.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/utils/DoubleIntListHashMap.java
@@ -23,7 +23,7 @@ import java.util.ArrayList;
/**
* This class provides a memory-efficient replacement for
- * HashMap<Double,IntArrayList> for restricted use cases.
+ * {@code HashMap<Double,IntArrayList>} for restricted use cases.
*
*/
public class DoubleIntListHashMap
@@ -40,19 +40,10 @@ public class DoubleIntListHashMap
_size = 0;
}
- /**
- *
- * @return
- */
public int size() {
return _size;
}
- /**
- *
- * @param key
- * @return
- */
public IntArrayList get(double key) {
// probe for early abort
if( _size == 0 )
@@ -72,11 +63,6 @@ public class DoubleIntListHashMap
return null;
}
- /**
- *
- * @param key
- * @param value
- */
public void appendValue(double key, IntArrayList value) {
// compute entry index position
int hash = hash(key);
@@ -93,10 +79,6 @@ public class DoubleIntListHashMap
resize();
}
- /**
- *
- * @return
- */
public ArrayList<DIListEntry> extractValues() {
ArrayList<DIListEntry> ret = new ArrayList<DIListEntry>();
for( DIListEntry e : _data ) {
@@ -112,9 +94,6 @@ public class DoubleIntListHashMap
return ret;
}
- /**
- *
- */
private void resize() {
// check for integer overflow on resize
if( _data.length > Integer.MAX_VALUE / RESIZE_FACTOR )
@@ -137,11 +116,6 @@ public class DoubleIntListHashMap
}
}
- /**
- *
- * @param key
- * @return
- */
private static int hash(double key) {
// basic double hash code (w/o object creation)
long bits = Double.doubleToRawLongBits(key);
@@ -154,19 +128,10 @@ public class DoubleIntListHashMap
return h ^ (h >>> 7) ^ (h >>> 4);
}
- /**
- *
- * @param h
- * @param length
- * @return
- */
private static int indexFor(int h, int length) {
return h & (length - 1);
}
- /**
- *
- */
public class DIListEntry {
public double key = Double.MAX_VALUE;
public IntArrayList value = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/utils/IntArrayList.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/utils/IntArrayList.java b/src/main/java/org/apache/sysml/runtime/compress/utils/IntArrayList.java
index 33455a2..ef4d476 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/utils/IntArrayList.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/utils/IntArrayList.java
@@ -22,7 +22,7 @@ package org.apache.sysml.runtime.compress.utils;
import java.util.Arrays;
/**
- * This class provides a memory-efficient replacement for ArrayList<Integer> for
+ * This class provides a memory-efficient replacement for {@code ArrayList<Integer>} for
* restricted use cases.
*
*/
@@ -40,18 +40,10 @@ public class IntArrayList
_size = 0;
}
- /**
- *
- * @return
- */
public int size() {
return _size;
}
- /**
- *
- * @param value
- */
public void appendValue(int value) {
// embedded value (no array allocation)
if( _size == 0 ) {
@@ -74,10 +66,6 @@ public class IntArrayList
_size++;
}
- /**
- *
- * @return
- */
public int[] extractValues() {
if( _size == 1 )
return new int[] { _val0 };
@@ -85,9 +73,6 @@ public class IntArrayList
return Arrays.copyOfRange(_data, 0, _size);
}
- /**
- *
- */
private void resize() {
// check for integer overflow on resize
if( _data.length > Integer.MAX_VALUE / RESIZE_FACTOR )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/compress/utils/LinearAlgebraUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/compress/utils/LinearAlgebraUtils.java b/src/main/java/org/apache/sysml/runtime/compress/utils/LinearAlgebraUtils.java
index 70e776a..7a4a013 100644
--- a/src/main/java/org/apache/sysml/runtime/compress/utils/LinearAlgebraUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/compress/utils/LinearAlgebraUtils.java
@@ -28,13 +28,6 @@ import org.apache.sysml.runtime.matrix.data.MatrixBlock;
*/
public class LinearAlgebraUtils {
- /**
- *
- * @param a
- * @param b
- * @param len
- * @return
- */
public static double dotProduct(double[] a, double[] b, final int len)
{
double val = 0;
@@ -61,16 +54,7 @@ public class LinearAlgebraUtils {
// scalar result
return val;
}
-
- /**
- *
- * @param a
- * @param b
- * @param ai
- * @param bi
- * @param len
- * @return
- */
+
public static double dotProduct( double[] a, double[] b, int ai, int bi, final int len )
{
double val = 0;
@@ -98,15 +82,7 @@ public class LinearAlgebraUtils {
//scalar result
return val;
}
-
- /**
- *
- * @param a
- * @param c
- * @param ai
- * @param ci
- * @param len
- */
+
public static void vectAdd( double[] a, double[] c, int ai, int ci, final int len )
{
final int bn = len%8;
@@ -131,16 +107,7 @@ public class LinearAlgebraUtils {
c[ ci+7 ] += a[ ai+7 ];
}
}
-
- /**
- *
- * @param aval
- * @param b
- * @param c
- * @param bix
- * @param ci
- * @param len
- */
+
public static void vectAdd( final double aval, double[] c, char[] bix, final int bi, final int ci, final int len )
{
final int bn = len%8;
@@ -162,14 +129,7 @@ public class LinearAlgebraUtils {
c[ ci+bix[j+7] ] += aval;
}
}
-
- /**
- *
- * @param aval
- * @param c
- * @param ci
- * @param len
- */
+
public static void vectAdd( final double aval, double[] c, final int ci, final int len )
{
final int bn = len%8;
@@ -191,17 +151,7 @@ public class LinearAlgebraUtils {
c[ ci+j+7 ] += aval;
}
}
-
- /**
- *
- * @param aval
- * @param b
- * @param c
- * @param bix
- * @param bi
- * @param ci
- * @param len
- */
+
public static void vectMultiplyAdd( final double aval, double[] b, double[] c, int[] bix, final int bi, final int ci, final int len )
{
final int bn = (len-bi)%8;
@@ -223,16 +173,7 @@ public class LinearAlgebraUtils {
c[ ci+bix[j+7] ] += aval * b[ j+7 ];
}
}
-
- /**
- *
- * @param aval
- * @param b
- * @param c
- * @param bi
- * @param ci
- * @param len
- */
+
public static void vectMultiplyAdd( final double aval, double[] b, double[] c, int bi, int ci, final int len )
{
final int bn = len%8;
@@ -258,15 +199,6 @@ public class LinearAlgebraUtils {
}
}
- /**
- *
- * @param a
- * @param aix
- * @param ai
- * @param ai2
- * @param len
- * @return
- */
public static double vectSum( double[] a, char[] bix, final int ai, final int bi, final int len )
{
double val = 0;
@@ -291,14 +223,7 @@ public class LinearAlgebraUtils {
return val;
}
-
- /**
- *
- * @param a
- * @param ai
- * @param len
- * @return
- */
+
public static double vectSum( double[] a, int ai, final int len )
{
double val = 0;
@@ -323,11 +248,7 @@ public class LinearAlgebraUtils {
return val;
}
-
- /**
- *
- * @param ret
- */
+
public static void copyUpperToLowerTriangle( MatrixBlock ret )
{
double[] c = ret.getDenseBlock();
@@ -339,13 +260,7 @@ public class LinearAlgebraUtils {
for( int j=i+1, lix=j*n+i; j<n; j++, lix+=n )
c[ lix ] = c[ uix+j ];
}
-
- /**
- *
- * @param ret
- * @param tmp
- * @param ix
- */
+
public static void copyNonZerosToRowCol( MatrixBlock ret, MatrixBlock tmp, int ix )
{
for(int i=0; i<tmp.getNumColumns(); i++) {
@@ -358,9 +273,10 @@ public class LinearAlgebraUtils {
}
/**
+ * Obtain the index of the closest element in a to the value x.
*
- * @param a
- * @param x
+ * @param a array of ints
+ * @param x value
* @return the index of the closest element in a to the value x
*/
public static int getClosestK(int[] a, int x) {
[2/5] incubator-systemml git commit: [SYSTEMML-842] Javadoc cleanup
in runtime compress and controlprogram packages
Posted by de...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalMemory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalMemory.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalMemory.java
index 49aef33..a1962e4 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalMemory.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeLocalMemory.java
@@ -223,11 +223,6 @@ public class ResultMergeLocalMemory extends ResultMerge
return moNew;
}
- /**
- *
- * @param output
- * @return
- */
private double[][] createCompareMatrix( MatrixBlock output )
{
double[][] ret = null;
@@ -240,16 +235,7 @@ public class ResultMergeLocalMemory extends ResultMerge
return ret;
}
-
- /**
- *
- * @param varName
- * @param vt
- * @param metadata
- * @param data
- * @return
- * @throws DMLRuntimeException
- */
+
private MatrixObject createNewMatrixObject( MatrixBlock data )
throws DMLRuntimeException
{
@@ -289,9 +275,10 @@ public class ResultMergeLocalMemory extends ResultMerge
* NOTE: similar to converters, but not directly applicable as we are interested in combining
* two objects with each other; not unary transformation.
*
- * @param out
- * @param in
- * @throws DMLRuntimeException
+ * @param out output matrix block
+ * @param in input matrix block
+ * @param appendOnly ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void merge( MatrixBlock out, MatrixBlock in, boolean appendOnly )
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMR.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMR.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMR.java
index 185acbb..b285a13 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMR.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMR.java
@@ -167,20 +167,7 @@ public class ResultMergeRemoteMR extends ResultMerge
return moNew;
}
-
- /**
- *
- * @param fname null if no comparison required
- * @param fnameNew
- * @param srcFnames
- * @param ii
- * @param oi
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings({ "unused", "deprecation" })
protected void executeMerge(String fname, String fnameNew, String[] srcFnames, InputInfo ii, OutputInfo oi, long rlen, long clen, int brlen, int bclen)
throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMapper.java
index c8f579a..2d30893 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteMapper.java
@@ -78,10 +78,7 @@ public class ResultMergeRemoteMapper
else
throw new RuntimeException("Unable to configure mapper with unknown input info: "+ii.toString());
}
-
- /**
- *
- */
+
@Override
public void close() throws IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteReducer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteReducer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteReducer.java
index e2d4614..2314845 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteReducer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteReducer.java
@@ -68,9 +68,6 @@ public class ResultMergeRemoteReducer
_reducer.processKeyValueList(key, valueList, out, reporter);
}
- /**
- *
- */
public void configure(JobConf job)
{
InputInfo ii = MRJobConfiguration.getResultMergeInputInfo(job);
@@ -90,10 +87,7 @@ public class ResultMergeRemoteReducer
else
throw new RuntimeException("Unable to configure mapper with unknown input info: "+ii.toString());
}
-
- /**
- *
- */
+
@Override
public void close() throws IOException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSpark.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSpark.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSpark.java
index c7acc6a..ef1ae02 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSpark.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSpark.java
@@ -114,20 +114,7 @@ public class ResultMergeRemoteSpark extends ResultMerge
return moNew;
}
-
- /**
- *
- * @param fname null if no comparison required
- * @param fnameNew
- * @param srcFnames
- * @param ii
- * @param oi
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @throws DMLRuntimeException
- */
+
@SuppressWarnings("unchecked")
protected RDDObject executeMerge(MatrixObject compare, MatrixObject[] inputs, String varname, long rlen, long clen, int brlen, int bclen)
throws DMLRuntimeException
@@ -201,15 +188,6 @@ public class ResultMergeRemoteSpark extends ResultMerge
return ret;
}
- /**
- *
- * @param rlen
- * @param clen
- * @param brlen
- * @param bclen
- * @param numRed
- * @return
- */
private int determineNumReducers(long rlen, long clen, int brlen, int bclen, long numRed)
{
//set the number of mappers and reducers
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSparkWCompare.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSparkWCompare.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSparkWCompare.java
index 5c21c1f..3fe6a50 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSparkWCompare.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/ResultMergeRemoteSparkWCompare.java
@@ -31,9 +31,6 @@ import org.apache.sysml.runtime.matrix.data.MatrixBlock;
import org.apache.sysml.runtime.matrix.data.MatrixIndexes;
import org.apache.sysml.runtime.util.DataConverter;
-/**
- *
- */
public class ResultMergeRemoteSparkWCompare extends ResultMerge implements PairFunction<Tuple2<MatrixIndexes,Tuple2<Iterable<MatrixBlock>,MatrixBlock>>, MatrixIndexes, MatrixBlock>
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/Task.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/Task.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/Task.java
index 6028b0f..0934ecf 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/Task.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/Task.java
@@ -86,11 +86,7 @@ public class Task implements Serializable
{
return _iterations.size();
}
-
- /**
- *
- * @param task
- */
+
public void mergeTask( Task task )
{
//check for set iteration type
@@ -114,11 +110,7 @@ public class Task implements Serializable
{
return toFormatedString();
}
-
- /**
- *
- * @return
- */
+
public String toFormatedString()
{
StringBuilder sb = new StringBuilder();
@@ -141,11 +133,7 @@ public class Task implements Serializable
sb.append("})");
return sb.toString();
}
-
- /**
- *
- * @return
- */
+
public String toCompactString()
{
StringBuilder sb = new StringBuilder( );
@@ -172,11 +160,7 @@ public class Task implements Serializable
return sb.toString();
}
-
- /**
- *
- * @return
- */
+
public String toCompactString( int maxDigits )
{
StringBuilder sb = new StringBuilder( );
@@ -207,12 +191,7 @@ public class Task implements Serializable
return sb.toString();
}
-
- /**
- *
- * @param stask
- * @return
- */
+
public static Task parseCompactString( String stask )
{
StringTokenizer st = new StringTokenizer( stask.trim(), "." );
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitioner.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitioner.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitioner.java
index 9349402..fe8311f 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitioner.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitioner.java
@@ -59,7 +59,8 @@ public abstract class TaskPartitioner
/**
* Creates and returns set of all tasks for given problem at once.
*
- * @return
+ * @return list of tasks
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract List<Task> createTasks()
throws DMLRuntimeException;
@@ -68,16 +69,14 @@ public abstract class TaskPartitioner
* Creates set of all tasks for given problem, but streams them directly
* into task queue. This allows for more tasks than fitting in main memory.
*
- * @return
+ *
+ * @param queue queue of takss
+ * @return ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract long createTasks( LocalTaskQueue<Task> queue )
throws DMLRuntimeException;
-
- /**
- *
- * @return
- */
public long getNumIterations() {
return _numIter;
}
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoring.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoring.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoring.java
index 66848f6..d202e07 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoring.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoring.java
@@ -193,8 +193,9 @@ public class TaskPartitionerFactoring extends TaskPartitioner
*
* NOTE: x can be set to different values, but the original paper argues for x=2.
*
- * @param R
- * @return
+ * @param R ?
+ * @param P ?
+ * @return next batch task size
*/
protected long determineNextBatchSize(long R, int P)
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoringCmax.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoringCmax.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoringCmax.java
index 058ede9..7116c61 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoringCmax.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/TaskPartitionerFactoringCmax.java
@@ -23,7 +23,7 @@ import org.apache.sysml.runtime.instructions.cp.IntObject;
/**
* Factoring with maximum constraint (e.g., if LIX matrix out-of-core and we need
- * to bound the maximum number of iterations per map task -> memory bounds)
+ * to bound the maximum number of iterations per map task -> memory bounds)
*/
public class TaskPartitionerFactoringCmax extends TaskPartitionerFactoring
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/MergedMRJobInstruction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/MergedMRJobInstruction.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/MergedMRJobInstruction.java
index 572591f..0021667 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/MergedMRJobInstruction.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/MergedMRJobInstruction.java
@@ -52,13 +52,7 @@ public class MergedMRJobInstruction
outIxOffs.put(instID, outIxOffset);
outIxLens.put(instID, outIxLen);
}
-
- /**
- *
- * @param instID
- * @param allRet
- * @return
- */
+
public JobReturn constructJobReturn( long instID, JobReturn retAll )
{
//get output offset and len
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorker.java
index 645f03e..fd3a4fc 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorker.java
@@ -30,10 +30,6 @@ import org.apache.sysml.runtime.instructions.MRJobInstruction;
import org.apache.sysml.runtime.matrix.JobReturn;
import org.apache.sysml.runtime.matrix.data.Pair;
-/**
- *
- *
- */
public abstract class PiggybackingWorker extends Thread
{
@@ -49,20 +45,11 @@ public abstract class PiggybackingWorker extends Thread
_stop = false;
}
- /**
- *
- */
public void setStopped()
{
_stop = true;
}
-
- /**
- *
- * @param instID
- * @return
- * @throws InterruptedException
- */
+
public synchronized JobReturn getJobResult( long instID )
throws InterruptedException
{
@@ -79,13 +66,7 @@ public abstract class PiggybackingWorker extends Thread
return ret;
}
-
-
- /**
- *
- * @param ids
- * @param results
- */
+
protected synchronized void putJobResults( LinkedList<Long> ids, LinkedList<JobReturn> results )
{
//make job returns available
@@ -95,13 +76,7 @@ public abstract class PiggybackingWorker extends Thread
//notify all waiting threads
notifyAll();
}
-
- /**
- *
- * @param workingSet
- * @return
- * @throws IllegalAccessException
- */
+
protected LinkedList<MergedMRJobInstruction> mergeMRJobInstructions( LinkedList<Pair<Long,MRJobInstruction>> workingSet )
throws IllegalAccessException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilDecayParallel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilDecayParallel.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilDecayParallel.java
index bc114e4..2ae8062 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilDecayParallel.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilDecayParallel.java
@@ -125,12 +125,7 @@ public class PiggybackingWorkerUtilDecayParallel extends PiggybackingWorker
}
}
}
-
-
- /**
- *
- *
- */
+
public class MRJobSubmitTask implements Runnable
{
private MergedMRJobInstruction _minst = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilTimeParallel.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilTimeParallel.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilTimeParallel.java
index 7326430..ddb33ba 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilTimeParallel.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/PiggybackingWorkerUtilTimeParallel.java
@@ -125,11 +125,6 @@ public class PiggybackingWorkerUtilTimeParallel extends PiggybackingWorker
}
}
-
- /**
- *
- *
- */
public class MRJobSubmitTask implements Runnable
{
private MergedMRJobInstruction _minst = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybacking.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybacking.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybacking.java
index 4da8cbe..66c882e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybacking.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybacking.java
@@ -31,10 +31,6 @@ import org.apache.sysml.runtime.matrix.JobReturn;
import org.apache.sysml.runtime.matrix.data.Pair;
-/**
- *
- *
- */
public class RuntimePiggybacking
{
@@ -70,32 +66,18 @@ public class RuntimePiggybacking
/////////////////////////////////////////////////
// public interface to runtime piggybacking
///////
-
- /**
- *
- * @return
- */
+
public static boolean isActive()
{
return _active;
}
-
- /**
- *
- * @param type
- * @param par
- * @throws DMLRuntimeException
- */
+
public static void start( int par )
throws DMLRuntimeException
{
start( DEFAULT_WORKER_TYPE, par );
}
-
- /**
- * @throws DMLRuntimeException
- *
- */
+
public static void start( PiggybackingType type, int par )
throws DMLRuntimeException
{
@@ -121,11 +103,7 @@ public class RuntimePiggybacking
//start worker
_worker.start();
}
-
- /**
- *
- * @throws DMLRuntimeException
- */
+
public static void stop()
throws DMLRuntimeException
{
@@ -144,14 +122,7 @@ public class RuntimePiggybacking
throw new DMLRuntimeException("Failed to stop runtime piggybacking server.", ex);
}
}
-
- /**
- *
- * @param inst
- * @param ec
- * @return
- * @throws DMLRuntimeException
- */
+
public static JobReturn submitJob(MRJobInstruction inst)
throws DMLRuntimeException
{
@@ -187,12 +158,7 @@ public class RuntimePiggybacking
return ret;
}
-
- /**
- *
- * @param type
- * @return
- */
+
public static boolean isSupportedJobType( JobType type )
{
// reblock and datagen apply as well but this would limit the recompilation
@@ -210,7 +176,7 @@ public class RuntimePiggybacking
* but are not necessarily mergable. This method returns the largest
* instruction set currently in the pool.
*
- * @return
+ * @return linked list of MR job instructions
*/
protected static LinkedList<Pair<Long,MRJobInstruction>> getMaxWorkingSet()
{
@@ -242,11 +208,7 @@ public class RuntimePiggybacking
return ret;
}
-
- /**
- *
- * @return
- */
+
public static boolean isEmptyJobPool()
{
return _pool.isEmpty();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybackingUtils.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybackingUtils.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybackingUtils.java
index 929bd56..972170c 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybackingUtils.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/mqo/RuntimePiggybackingUtils.java
@@ -36,8 +36,8 @@ public class RuntimePiggybackingUtils
* the cluster utilization since the binary compatible API returns
* always a constant of 1 for occupied slots.
*
- * @return
- * @throws IOException
+ * @return cluster utilization (percentage of currently used resources to maximum resources)
+ * @throws IOException if IOException occurs
*/
public static double getCurrentClusterUtilization()
throws IOException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimator.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimator.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimator.java
index 671e477..bdf8884 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimator.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimator.java
@@ -52,10 +52,10 @@ public abstract class CostEstimator
/**
* Main leaf node estimation method - to be overwritten by specific cost estimators
*
- * @param measure
- * @param node
- * @return
- * @throws DMLRuntimeException
+ * @param measure ?
+ * @param node internal representation of a plan alternative for program blocks and instructions
+ * @return estimate?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract double getLeafNodeEstimate( TestMeasure measure, OptNode node )
throws DMLRuntimeException;
@@ -63,11 +63,11 @@ public abstract class CostEstimator
/**
* Main leaf node estimation method - to be overwritten by specific cost estimators
*
- * @param measure
- * @param node
- * @param et forced execution type for leaf node
- * @return
- * @throws DMLRuntimeException
+ * @param measure ?
+ * @param node internal representation of a plan alternative for program blocks and instructions
+ * @param et forced execution type for leaf node
+ * @return estimate?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract double getLeafNodeEstimate( TestMeasure measure, OptNode node, ExecType et )
throws DMLRuntimeException;
@@ -80,10 +80,10 @@ public abstract class CostEstimator
/**
* Main estimation method.
*
- * @param measure
- * @param node
- * @return
- * @throws DMLRuntimeException
+ * @param measure ?
+ * @param node internal representation of a plan alternative for program blocks and instructions
+ * @return estimate?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public double getEstimate( TestMeasure measure, OptNode node )
throws DMLRuntimeException
@@ -94,10 +94,11 @@ public abstract class CostEstimator
/**
* Main estimation method.
*
- * @param measure
- * @param node
- * @return
- * @throws DMLRuntimeException
+ * @param measure ?
+ * @param node internal representation of a plan alternative for program blocks and instructions
+ * @param et execution type
+ * @return estimate?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public double getEstimate( TestMeasure measure, OptNode node, ExecType et )
throws DMLRuntimeException
@@ -177,45 +178,22 @@ public abstract class CostEstimator
return val;
}
-
- /**
- *
- * @param plan
- * @param n
- * @return
- */
public double computeLocalParBound(OptTree plan, OptNode n)
{
return Math.floor(rComputeLocalValueBound(plan.getRoot(), n, plan.getCK()));
}
- /**
- *
- * @param plan
- * @param n
- * @return
- */
public double computeLocalMemoryBound(OptTree plan, OptNode n)
{
return rComputeLocalValueBound(plan.getRoot(), n, plan.getCM());
}
-
- /**
- *
- * @param pn
- * @return
- */
+
public double getMinMemoryUsage(OptNode pn)
{
// TODO implement for DP enum optimizer
throw new RuntimeException("Not implemented yet.");
}
-
- /**
- *
- * @param measure
- * @return
- */
+
protected double getDefaultEstimate(TestMeasure measure)
{
double val = -1;
@@ -228,14 +206,7 @@ public abstract class CostEstimator
return val;
}
-
- /**
- *
- * @param measure
- * @param nodes
- * @return
- * @throws DMLRuntimeException
- */
+
protected double getMaxEstimate( TestMeasure measure, ArrayList<OptNode> nodes, ExecType et )
throws DMLRuntimeException
{
@@ -248,14 +219,7 @@ public abstract class CostEstimator
}
return max;
}
-
- /**
- *
- * @param measure
- * @param nodes
- * @return
- * @throws DMLRuntimeException
- */
+
protected double getSumEstimate( TestMeasure measure, ArrayList<OptNode> nodes, ExecType et )
throws DMLRuntimeException
{
@@ -264,14 +228,7 @@ public abstract class CostEstimator
sum += getEstimate( measure, n, et );
return sum;
}
-
- /**
- *
- * @param measure
- * @param nodes
- * @return
- * @throws DMLRuntimeException
- */
+
protected double getWeightedEstimate( TestMeasure measure, ArrayList<OptNode> nodes, ExecType et )
throws DMLRuntimeException
{
@@ -283,14 +240,6 @@ public abstract class CostEstimator
return ret;
}
-
- /**
- *
- * @param current
- * @param node
- * @param currentVal
- * @return
- */
protected double rComputeLocalValueBound( OptNode current, OptNode node, double currentVal )
{
if( current == node ) //found node
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorHops.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorHops.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorHops.java
index 6fd9615..9ee7c2b 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorHops.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorHops.java
@@ -29,10 +29,6 @@ import org.apache.sysml.runtime.controlprogram.parfor.opt.Optimizer.CostModelTyp
import org.apache.sysml.runtime.controlprogram.parfor.opt.PerfTestTool.TestMeasure;
import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
-/**
- *
- *
- */
public class CostEstimatorHops extends CostEstimator
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorRuntime.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorRuntime.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorRuntime.java
index 0b09c2a..4628c8c 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorRuntime.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostEstimatorRuntime.java
@@ -78,72 +78,26 @@ public class CostEstimatorRuntime extends CostEstimator
return getLeafNodeEstimate(measure, node);
}
-
- /**
- *
- * @param measure
- * @param instName
- * @param datasize
- * @param sparsity
- * @param dataformat
- * @return
- * @throws DMLRuntimeException
- */
+
public double getEstimate( TestMeasure measure, String instName, double datasize, double sparsity, DataFormat dataformat )
throws DMLRuntimeException
{
return getEstimate(measure, instName, datasize, sparsity, DEFAULT_EST_PARALLELISM, dataformat);
}
-
- /**
- *
- * @param measure
- * @param instName
- * @param datasize
- * @param sparsity
- * @param parallelism
- * @param dataformat
- * @return
- * @throws DMLRuntimeException
- */
+
public double getEstimate( TestMeasure measure, String instName, double datasize, double sparsity, double parallelism, DataFormat dataformat )
throws DMLRuntimeException
{
double dim = Math.sqrt( datasize );
return getEstimate(measure, instName, dim, dim, dim, sparsity, parallelism, dataformat);
}
-
- /**
- *
- * @param measure
- * @param instName
- * @param dim1
- * @param dim2
- * @param dim3
- * @param sparsity
- * @param dataformat
- * @return
- * @throws DMLRuntimeException
- */
+
public double getEstimate( TestMeasure measure, String instName, double dim1, double dim2, double dim3, double sparsity, DataFormat dataformat )
throws DMLRuntimeException
{
return getEstimate(measure, instName, dim1, dim2, dim3, sparsity, DEFAULT_EST_PARALLELISM, dataformat);
}
-
- /**
- *
- * @param measure
- * @param instName
- * @param dim1
- * @param dim2
- * @param dim3
- * @param sparsity
- * @param parallelism
- * @param dataformat
- * @return
- * @throws DMLRuntimeException
- */
+
public double getEstimate( TestMeasure measure, String instName, double dim1, double dim2, double dim3, double sparsity, double parallelism, DataFormat dataformat )
throws DMLRuntimeException
{
@@ -219,16 +173,6 @@ public class CostEstimatorRuntime extends CostEstimator
return ret;
}
- /**
- *
- * @param f1
- * @param f2
- * @param x1
- * @param d1
- * @param x2
- * @param d2
- * @return
- */
private static double aggregate( CostFunction f1, CostFunction f2, double x1, double d1, double x2, double d2 )
{
double val11 = f1.estimate(x1);
@@ -246,16 +190,6 @@ public class CostEstimatorRuntime extends CostEstimator
return ret;
}
- /**
- *
- * @param f1
- * @param f2
- * @param x1
- * @param d1
- * @param x2
- * @param d2
- * @return
- */
private static double aggregate( CostFunction f1, CostFunction f2, double[] x1, double[] d1, double x2, double d2 )
{
double val11 = f1.estimate(x1);
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostFunction.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostFunction.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostFunction.java
index 0da88e4..4bf2bd7 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostFunction.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/CostFunction.java
@@ -50,20 +50,11 @@ public class CostFunction
_multiDim = multiDim;
}
- /**
- *
- * @return
- */
public boolean isMultiDim()
{
return _multiDim;
}
-
- /**
- *
- * @param in
- * @return
- */
+
public double estimate( double in )
{
double costs = 0;
@@ -89,12 +80,7 @@ public class CostFunction
return costs;
}
-
- /**
- *
- * @param in
- * @return
- */
+
public double estimate( double[] in )
{
double costs = 0;
@@ -125,11 +111,7 @@ public class CostFunction
return costs;
}
-
- /**
- *
- * @return
- */
+
public double[] getParams()
{
return _params;
@@ -153,12 +135,7 @@ public class CostFunction
return sb.toString();
}
-
- /**
- *
- * @param cost
- * @return
- */
+
private double correctEstimate( double cost )
{
double ret = cost;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTable.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTable.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTable.java
index 9202f0f..421037c 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTable.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTable.java
@@ -26,10 +26,6 @@ import java.util.Map;
import org.apache.sysml.runtime.controlprogram.parfor.opt.PerfTestTool.TestMeasure;
-/**
- *
- *
- */
public class MemoTable
{
@@ -42,12 +38,6 @@ public class MemoTable
_memo = new HashMap<Long, Collection<MemoTableEntry>>();
}
- /**
- *
- * @param ID
- * @param e
- * @param keepOnlyMin
- */
public void putMemoTableEntry( long ID, MemoTableEntry e, boolean keepOnlyMin )
{
//create memo structure on demand
@@ -76,11 +66,7 @@ public class MemoTable
else
entries.add(e);
}
-
- /**
- *
- * @return
- */
+
public boolean hasCandidates()
{
for( Collection<MemoTableEntry> entries : _memo.values() )
@@ -88,11 +74,7 @@ public class MemoTable
return true;
return false;
}
-
- /**
- *
- * @return
- */
+
public Collection<MemoTableEntry> getCandidates()
{
Collection<MemoTableEntry> C = new LinkedList<MemoTableEntry>();
@@ -103,33 +85,17 @@ public class MemoTable
return C;
}
-
- /**
- *
- * @param ID
- * @return
- */
+
public MemoTableEntry getMinTimeEntry( long ID )
{
return getMin( ID, TestMeasure.EXEC_TIME );
}
-
- /**
- *
- * @param ID
- * @return
- */
+
public MemoTableEntry getMinMemEntry( long ID )
{
return getMin( ID, TestMeasure.MEMORY_USAGE );
}
-
- /**
- *
- * @param ID
- * @param measure
- * @return
- */
+
private MemoTableEntry getMin( long ID, TestMeasure measure )
{
MemoTableEntry minObj = null;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTableEntry.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTableEntry.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTableEntry.java
index 020e077..f9fa208 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTableEntry.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/MemoTableEntry.java
@@ -22,10 +22,6 @@ package org.apache.sysml.runtime.controlprogram.parfor.opt;
import org.apache.sysml.runtime.controlprogram.ProgramBlock;
-/**
- *
- *
- */
public class MemoTableEntry
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptNode.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptNode.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptNode.java
index 20c08c6..94f0eda 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptNode.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptNode.java
@@ -245,13 +245,7 @@ public class OptNode
{
_stats = stats;
}
-
- /**
- *
- * @param oldNode
- * @param newNode
- * @return
- */
+
public boolean exchangeChild(OptNode oldNode, OptNode newNode)
{
boolean ret = false;
@@ -266,12 +260,7 @@ public class OptNode
return ret;
}
-
- /**
- *
- * @param qn
- * @return
- */
+
public boolean containsNode( OptNode qn )
{
boolean ret = (this == qn);
@@ -283,12 +272,7 @@ public class OptNode
return ret;
}
-
- /**
- *
- * @param type
- * @return
- */
+
public boolean containsNode( NodeType type )
{
boolean ret = (_ntype == type);
@@ -300,20 +284,12 @@ public class OptNode
return ret;
}
-
- /**
- *
- * @return
- */
+
public boolean isLeaf()
{
return ( _childs == null || _childs.isEmpty() );
}
-
- /**
- *
- * @return
- */
+
public boolean hasOnlySimpleChilds()
{
boolean ret = true;
@@ -328,20 +304,12 @@ public class OptNode
return ret;
}
-
- /**
- *
- * @return
- */
+
public String getInstructionName()
{
return String.valueOf(_etype) + Lop.OPERAND_DELIMITOR + getParam(ParamType.OPSTRING);
}
-
- /**
- *
- * @return
- */
+
public boolean isRecursive()
{
boolean ret = false;
@@ -354,12 +322,7 @@ public class OptNode
///////
//recursive methods
-
-
- /**
- *
- * @return
- */
+
public Collection<OptNode> getNodeList()
{
Collection<OptNode> nodes = new LinkedList<OptNode>();
@@ -371,11 +334,7 @@ public class OptNode
return nodes;
}
-
- /**
- *
- * @return
- */
+
public Collection<OptNode> getNodeList( ExecType et )
{
Collection<OptNode> nodes = new LinkedList<OptNode>();
@@ -389,11 +348,7 @@ public class OptNode
return nodes;
}
-
- /**
- *
- * @return
- */
+
public Collection<OptNode> getRelevantNodeList()
{
Collection<OptNode> nodes = new LinkedList<OptNode>();
@@ -436,7 +391,7 @@ public class OptNode
/**
* Gets the number of plan nodes.
*
- * @return
+ * @return number of plan nodes
*/
public int size()
{
@@ -448,10 +403,10 @@ public class OptNode
}
/**
- * Determines if all programblocks and instructions exhibit
+ * Determines if all program blocks and instructions exhibit
* the execution type CP.
*
- * @return
+ * @return true of all program blocks and instructions execute on CP
*/
public boolean isCPOnly()
{
@@ -464,12 +419,7 @@ public class OptNode
}
return ret;
}
-
-
- /**
- *
- * @return
- */
+
public int getTotalK()
{
int k = 1;
@@ -487,12 +437,7 @@ public class OptNode
return k;
}
-
- /**
- *
- * @param N
- * @return
- */
+
public long getMaxC( long N )
{
long maxc = N;
@@ -516,11 +461,6 @@ public class OptNode
return maxc;
}
-
- /**
- *
- * @return
- */
public boolean hasNestedParallelism( boolean flagNested )
{
boolean ret = false;
@@ -544,12 +484,6 @@ public class OptNode
return ret;
}
-
- /**
- *
- * @param flagNested
- * @return
- */
public boolean hasNestedPartitionReads( boolean flagNested )
{
boolean ret = false;
@@ -576,10 +510,6 @@ public class OptNode
return ret;
}
-
- /**
- *
- */
public void checkAndCleanupLeafNodes()
{
if( _childs != null )
@@ -595,11 +525,7 @@ public class OptNode
}
}
}
-
- /**
- * @param stack
- *
- */
+
public void checkAndCleanupRecursiveFunc(Set<String> stack)
{
//recursive invocation
@@ -622,9 +548,9 @@ public class OptNode
/**
* Explain tool: prints the hierarchical plan to <code>stdout</code>.
*
- * @param level
- * @param withDetails
- * @return
+ * @param level depth to print?
+ * @param withDetails if true, explain details
+ * @return string explanation
*/
public String explain(int level, boolean withDetails)
{
@@ -681,9 +607,9 @@ public class OptNode
}
/**
- * Determines the maximum problem size of all childs.
+ * Determines the maximum problem size of all children.
*
- * @return
+ * @return maximum problem size
*/
public long getMaxProblemSize()
{
@@ -699,12 +625,7 @@ public class OptNode
return max;
}
-
-
- /**
- *
- * @return
- */
+
@SuppressWarnings("unchecked")
public OptNode createShallowClone()
{
@@ -717,11 +638,7 @@ public class OptNode
n.setParams((HashMap<ParamType,String>)_params.clone());
return n;
}
-
- /**
- *
- * @return
- */
+
public OptNode createDeepClone()
{
throw new RuntimeException("not implemented yet");
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTree.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTree.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTree.java
index d60cbf2..39bb727 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTree.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTree.java
@@ -91,8 +91,8 @@ public class OptTree
* Explain tool: prints the hierarchical plan (including all available
* detail information, if necessary) to <code>stdout</code>.
*
- * @param withDetails
- * @return
+ * @param withDetails if true, include explain details
+ * @return string explanation
*/
public String explain( boolean withDetails )
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
index c65a627..dba6dd1 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreeConverter.java
@@ -125,15 +125,7 @@ public class OptTreeConverter
return tree;
}
-
- /**
- *
- * @param ck
- * @param cm
- * @param pfpb
- * @return
- * @throws DMLRuntimeException
- */
+
public static OptTree createOptTree( int ck, double cm, ParForProgramBlock pfpb )
throws DMLRuntimeException
{
@@ -165,14 +157,6 @@ public class OptTreeConverter
return tree;
}
- /**
- *
- * @param pb
- * @param vars
- * @param topLevel
- * @return
- * @throws DMLRuntimeException
- */
public static OptNode rCreateOptNode( ProgramBlock pb, LocalVariableMap vars, boolean topLevel, boolean storeObjs )
throws DMLRuntimeException
{
@@ -285,16 +269,7 @@ public class OptTreeConverter
return node;
}
-
-
- /**
- *
- * @param instset
- * @param vars
- * @return
- * @throws DMLRuntimeException
- */
public static ArrayList<OptNode> createOptNodes (ArrayList<Instruction> instset, LocalVariableMap vars, boolean storeObjs)
throws DMLRuntimeException
{
@@ -303,14 +278,7 @@ public class OptTreeConverter
tmp.add( createOptNode(inst,vars,storeObjs) );
return tmp;
}
-
- /**
- *
- * @param inst
- * @param vars
- * @return
- * @throws DMLRuntimeException
- */
+
public static OptNode createOptNode( Instruction inst, LocalVariableMap vars, boolean storeObjs )
throws DMLRuntimeException
{
@@ -348,17 +316,7 @@ public class OptTreeConverter
return node;
}
-
- /**
- *
- * @param sb
- * @param pb
- * @param vars
- * @param topLevel
- * @return
- * @throws DMLRuntimeException
- * @throws HopsException
- */
+
public static OptNode rCreateAbstractOptNode( StatementBlock sb, ProgramBlock pb, LocalVariableMap vars, boolean topLevel, Set<String> memo )
throws DMLRuntimeException, HopsException
{
@@ -547,14 +505,6 @@ public class OptTreeConverter
return node;
}
- /**
- *
- * @param hops
- * @param vars
- * @return
- * @throws DMLRuntimeException
- * @throws HopsException
- */
public static ArrayList<OptNode> createAbstractOptNodes(ArrayList<Hop> hops, LocalVariableMap vars, Set<String> memo )
throws DMLRuntimeException, HopsException
{
@@ -570,15 +520,7 @@ public class OptTreeConverter
return ret;
}
-
- /**
- *
- * @param hop
- * @param vars
- * @return
- * @throws DMLRuntimeException
- * @throws HopsException
- */
+
public static ArrayList<OptNode> rCreateAbstractOptNodes(Hop hop, LocalVariableMap vars, Set<String> memo)
throws DMLRuntimeException, HopsException
{
@@ -671,11 +613,6 @@ public class OptTreeConverter
return ret;
}
- /**
- *
- * @param pb
- * @return
- */
public static boolean rContainsMRJobInstruction( ProgramBlock pb, boolean inclFunctions )
{
boolean ret = false;
@@ -728,22 +665,12 @@ public class OptTreeConverter
return ret;
}
-
- /**
- *
- * @param pb
- * @return
- */
+
public static boolean containsMRJobInstruction( ProgramBlock pb, boolean inclCPFile, boolean inclSpark )
{
return containsMRJobInstruction(pb.getInstructions(), inclCPFile, inclSpark);
}
-
- /**
- *
- * @param pb
- * @return
- */
+
public static boolean containsMRJobInstruction( ArrayList<Instruction> instSet, boolean inclCPFile, boolean inclSpark )
{
boolean ret = false;
@@ -759,12 +686,7 @@ public class OptTreeConverter
return ret;
}
-
- /**
- *
- * @param pb
- * @return
- */
+
public static boolean containsFunctionCallInstruction( ProgramBlock pb )
{
boolean ret = false;
@@ -777,16 +699,7 @@ public class OptTreeConverter
return ret;
}
-
-
- /**
- *
- * @param inst
- * @param on
- * @param vars
- * @return
- * @throws DMLRuntimeException
- */
+
private static OptNodeStatistics analyzeStatistics(Instruction inst, OptNode on, LocalVariableMap vars)
throws DMLRuntimeException
{
@@ -884,14 +797,6 @@ public class OptTreeConverter
return ret; //null if not reqistered for profiling
}
- /**
- *
- * @param parent
- * @param n
- * @param pbOld
- * @param pbNew
- * @throws DMLRuntimeException
- */
public static void replaceProgramBlock(OptNode parent, OptNode n, ProgramBlock pbOld, ProgramBlock pbNew, boolean rtMap)
throws DMLRuntimeException
{
@@ -939,13 +844,7 @@ public class OptTreeConverter
else
_hlMap.replaceMapping(pbNew, n);
}
-
- /**
- *
- * @param pbs
- * @param pbOld
- * @param pbNew
- */
+
public static void replaceProgramBlock(ArrayList<ProgramBlock> pbs, ProgramBlock pbOld, ProgramBlock pbNew)
{
int len = pbs.size();
@@ -972,15 +871,7 @@ public class OptTreeConverter
{
return _rtMap;
}
-
- /**
- *
- * @param pRoot
- * @param hlNodeID
- * @param newRtNode
- * @return
- * @throws DMLRuntimeException
- */
+
public static OptNode exchangeTemporary(OptNode pRoot, long hlNodeID, OptNode newRtNode)
throws DMLRuntimeException
{
@@ -1014,12 +905,7 @@ public class OptTreeConverter
return pRoot;
}
-
- /**
- *
- * @param hlNodeID
- * @throws DMLRuntimeException
- */
+
public static void revertTemporaryChange( long hlNodeID )
throws DMLRuntimeException
{
@@ -1046,14 +932,6 @@ public class OptTreeConverter
_tmpChildOld = null;
}
- /**
- *
- * @param pRoot
- * @param hlNodeID
- * @param newRtNode
- * @return
- * @throws DMLRuntimeException
- */
public static OptNode exchangePermanently(OptNode pRoot, long hlNodeID, OptNode newRtNode)
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanChecker.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanChecker.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanChecker.java
index 3b357f9..5099feb 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanChecker.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanChecker.java
@@ -47,21 +47,9 @@ import org.apache.sysml.runtime.controlprogram.WhileProgramBlock;
import org.apache.sysml.runtime.instructions.Instruction;
import org.apache.sysml.runtime.instructions.cp.FunctionCallCPInstruction;
-/**
- *
- *
- */
public class OptTreePlanChecker
{
-
- /**
- *
- * @param pb
- * @param sb
- * @param fnStack
- * @throws HopsException
- * @throws DMLRuntimeException
- */
+
public static void checkProgramCorrectness( ProgramBlock pb, StatementBlock sb, Set<String> fnStack )
throws HopsException, DMLRuntimeException
{
@@ -135,17 +123,7 @@ public class OptTreePlanChecker
}
}
-
- /**
- *
- * @param prog
- * @param dprog
- * @param roots
- * @param inst
- * @param fnStack
- * @throws DMLRuntimeException
- * @throws HopsException
- */
+
private static void checkHopDagCorrectness( Program prog, DMLProgram dprog, ArrayList<Hop> roots, ArrayList<Instruction> inst, Set<String> fnStack )
throws DMLRuntimeException, HopsException
{
@@ -153,47 +131,21 @@ public class OptTreePlanChecker
for( Hop hop : roots )
checkHopDagCorrectness(prog, dprog, hop, inst, fnStack);
}
-
- /**
- *
- * @param prog
- * @param dprog
- * @param root
- * @param inst
- * @param fnStack
- * @throws DMLRuntimeException
- * @throws HopsException
- */
+
private static void checkHopDagCorrectness( Program prog, DMLProgram dprog, Hop root, ArrayList<Instruction> inst, Set<String> fnStack )
throws DMLRuntimeException, HopsException
{
//set of checks to perform
checkFunctionNames(prog, dprog, root, inst, fnStack);
}
-
- /**
- *
- * @param pb
- * @param sb
- * @throws DMLRuntimeException
- */
+
private static void checkLinksProgramStatementBlock( ProgramBlock pb, StatementBlock sb )
throws DMLRuntimeException
{
if( pb.getStatementBlock() != sb )
throw new DMLRuntimeException("Links between programblocks and statementblocks are incorrect ("+pb+").");
}
-
- /**
- *
- * @param prog
- * @param dprog
- * @param root
- * @param inst
- * @param fnStack
- * @throws DMLRuntimeException
- * @throws HopsException
- */
+
private static void checkFunctionNames( Program prog, DMLProgram dprog, Hop root, ArrayList<Instruction> inst, Set<String> fnStack )
throws DMLRuntimeException, HopsException
{
@@ -231,12 +183,7 @@ public class OptTreePlanChecker
}
}
}
-
- /**
- *
- * @param hop
- * @param memo
- */
+
private static void getAllFunctionOps( Hop hop, HashMap<String, FunctionOp> memo )
{
if( hop.getVisited() == VisitStatus.DONE )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanMapping.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanMapping.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanMapping.java
index dcf04f3..c1d1f88 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanMapping.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptTreePlanMapping.java
@@ -40,22 +40,12 @@ public class OptTreePlanMapping
_idSeq = new IDSequence();
_id_optnode = new HashMap<Long, OptNode>();
}
-
- /**
- *
- * @param id
- * @return
- */
+
public OptNode getOptNode( long id )
{
return _id_optnode.get(id);
}
-
- /**
- *
- * @param id
- * @return
- */
+
public long getMappedParentID( long id )
{
for( OptNode p : _id_optnode.values() )
@@ -65,10 +55,7 @@ public class OptTreePlanMapping
return p.getID();
return -1;
}
-
- /**
- *
- */
+
public void clear()
{
_id_optnode.clear();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
index 6ee8957..9a2d7dc 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizationWrapper.java
@@ -109,10 +109,11 @@ public class OptimizationWrapper
*
* NOTE: currently note used at all.
*
- * @param prog
- * @param rtprog
- * @throws DMLRuntimeException
- * @throws LanguageException
+ * @param prog dml program
+ * @param rtprog runtime program
+ * @param monitor ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
+ * @throws LanguageException if LanguageException occurs
*/
public static void optimize(DMLProgram prog, Program rtprog, boolean monitor)
throws DMLRuntimeException, LanguageException
@@ -150,10 +151,12 @@ public class OptimizationWrapper
*
* NOTE: this is the default way to invoke parfor optimizers.
*
- * @param type
- * @param sb
- * @param pb
- * @throws DMLRuntimeException
+ * @param type ?
+ * @param sb parfor statement block
+ * @param pb parfor program block
+ * @param ec execution context
+ * @param monitor ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public static void optimize( POptMode type, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, boolean monitor )
throws DMLRuntimeException
@@ -177,11 +180,7 @@ public class OptimizationWrapper
if( monitor )
StatisticMonitor.putPFStat( pb.getID() , Stat.OPT_T, timeVal);
}
-
- /**
- *
- * @param optLogLevel
- */
+
public static void setLogLevel( Level optLogLevel )
{
if( !LDEBUG ){ //set log level if not overwritten by internal flag
@@ -189,17 +188,7 @@ public class OptimizationWrapper
.setLevel( optLogLevel );
}
}
-
- /**
- *
- * @param type
- * @param ck
- * @param cm
- * @param sb
- * @param pb
- * @throws DMLRuntimeException
- * @throws
- */
+
@SuppressWarnings("unused")
private static void optimize( POptMode otype, int ck, double cm, ParForStatementBlock sb, ParForProgramBlock pb, ExecutionContext ec, boolean monitor )
throws DMLRuntimeException
@@ -348,12 +337,6 @@ public class OptimizationWrapper
}
}
- /**
- *
- * @param prog
- * @param rtprog
- * @throws LanguageException
- */
private static void findParForProgramBlocks( DMLProgram prog, Program rtprog,
HashMap<Long, ParForStatementBlock> sbs, HashMap<Long, ParForProgramBlock> pbs )
throws LanguageException
@@ -384,12 +367,7 @@ public class OptimizationWrapper
rfindParForProgramBlocks(sb, pb, sbs, pbs);
}
}
-
- /**
- *
- * @param sb
- * @param pb
- */
+
private static void rfindParForProgramBlocks( StatementBlock sb, ProgramBlock pb,
HashMap<Long, ParForStatementBlock> sbs, HashMap<Long, ParForProgramBlock> pbs )
{
@@ -440,13 +418,7 @@ public class OptimizationWrapper
rfindParForProgramBlocks(isbs2.get(i), ipbs2.get(i), sbs, pbs);
}
}
-
- /**
- *
- * @param otype
- * @return
- * @throws DMLRuntimeException
- */
+
private static Optimizer createOptimizer( POptMode otype )
throws DMLRuntimeException
{
@@ -479,12 +451,6 @@ public class OptimizationWrapper
return opt;
}
- /**
- *
- * @param cmtype
- * @return
- * @throws DMLRuntimeException
- */
private static CostEstimator createCostEstimator( CostModelType cmtype )
throws DMLRuntimeException
{
@@ -504,11 +470,7 @@ public class OptimizationWrapper
return est;
}
-
- /**
- *
- * @return
- */
+
private static ProgramRewriter createProgramRewriterWithRuleSets()
{
//create hop rewrite set
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
index 4d9fd60..fc71971 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/Optimizer.java
@@ -68,51 +68,36 @@ public abstract class Optimizer
_numTotalPlans = 0;
_numEvaluatedPlans = 0;
}
-
+
/**
+ * Optimize
*
- * @param plan
+ * @param sb parfor statement block
+ * @param pb parfor program block
+ * @param plan complete plan of a top-level parfor
+ * @param est cost estimator
+ * @param ec execution context
* @return true if plan changed, false otherwise
- * @throws DMLRuntimeException
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public abstract boolean optimize(ParForStatementBlock sb, ParForProgramBlock pb, OptTree plan, CostEstimator est, ExecutionContext ec)
throws DMLRuntimeException;
-
- /**
- *
- * @return
- */
+
public abstract PlanInputType getPlanInputType();
-
- /**
- *
- * @return
- */
+
public abstract CostModelType getCostModelType();
-
- /**
- *
- * @return
- */
+
public abstract POptMode getOptMode();
///////
//methods for evaluating the overall properties and costing
- /**
- *
- * @return
- */
public long getNumTotalPlans()
{
return _numTotalPlans;
}
-
- /**
- *
- * @return
- */
+
public long getNumEvaluatedPlans()
{
return _numEvaluatedPlans;
@@ -127,6 +112,10 @@ public abstract class Optimizer
/**
* Enum node plans (only for current opt node)
+ *
+ * @param n internal representation of a plan alternative for program blocks and instructions
+ * @param lck ?
+ * @return collection of optimization nodes
*/
protected Collection<OptNode> enumPlans( OptNode n, double lck )
{
@@ -137,11 +126,6 @@ public abstract class Optimizer
return plans;
}
- /**
- *
- * @param n
- * @return
- */
private Collection<OptNode> enumerateExecTypes( OptNode n )
{
Collection<OptNode> dTypes = new LinkedList<OptNode>();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
index 2daf841..73a4b7e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/opt/OptimizerConstrained.java
@@ -220,12 +220,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
///////
//REWRITE set data partitioner
///
-
- /**
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
@Override
protected boolean rewriteSetDataPartitioner(OptNode n, LocalVariableMap vars, HashMap<String,PDataPartitionFormat> partitionedMatrices)
throws DMLRuntimeException
@@ -250,14 +245,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
///////
//REWRITE set execution strategy
///
-
- /**
- *
- *
- * @param n
- * @param M
- * @throws DMLRuntimeException
- */
+
@Override
protected boolean rewriteSetExecutionStategy(OptNode n, double M0, double M, double M2, boolean flagLIX)
throws DMLRuntimeException
@@ -283,16 +271,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
///////
//REWRITE set degree of parallelism
///
-
- /**
- *
- * @param n
- * @param M
- * @param kMax
- * @param mMax (per node)
- * @param nested
- * @throws DMLRuntimeException
- */
+
@Override
protected void rewriteSetDegreeOfParallelism(OptNode n, double M, boolean flagNested)
throws DMLRuntimeException
@@ -313,12 +292,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
///////
//REWRITE set task partitioner
///
-
- /**
- *
- * @param n
- * @param partitioner
- */
+
@Override
protected void rewriteSetTaskPartitioner(OptNode pn, boolean flagNested, boolean flagLIX)
{
@@ -349,13 +323,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
///////
//REWRITE set result merge
///
-
- /**
- *
- *
- * @param n
- * @throws DMLRuntimeException
- */
+
@Override
protected void rewriteSetResultMerge( OptNode n, LocalVariableMap vars, boolean inLocal )
throws DMLRuntimeException
@@ -376,16 +344,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
///////
//REWRITE set fused data partitioning / execution
///
-
- /**
- *
- * @param pn
- * @param flagLIX
- * @param partitionedMatrices
- * @param vars
- * @param emode
- * @throws DMLRuntimeException
- */
+
protected void rewriteSetFusedDataPartitioningExecution(OptNode pn, double M, boolean flagLIX, HashMap<String, PDataPartitionFormat> partitionedMatrices, LocalVariableMap vars, PExecMode emode)
throws DMLRuntimeException
{
@@ -428,12 +387,7 @@ public class OptimizerConstrained extends OptimizerRuleBased
else
super.rewriteSetFusedDataPartitioningExecution(pn, M, flagLIX, partitionedMatrices, vars);
}
-
- /**
- *
- * @param pn
- * @return
- */
+
private PExecMode getPExecMode( OptNode pn )
{
ParForProgramBlock pfpb = (ParForProgramBlock) OptTreeConverter
[4/5] incubator-systemml git commit: [SYSTEMML-842] Javadoc cleanup
in runtime compress and controlprogram packages
Posted by de...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlock.java
index d01b444..f01c049 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlock.java
@@ -85,8 +85,11 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
* functions. Remaining parameters will just be passed to constructor for
* function program block.
*
- * @param eFuncStat
- * @throws DMLRuntimeException
+ * @param prog runtime program
+ * @param inputParams list of input data identifiers
+ * @param outputParams list of output data indentifiers
+ * @param baseDir base directory
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected ExternalFunctionProgramBlock(Program prog,
ArrayList<DataIdentifier> inputParams,
@@ -136,18 +139,14 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
* by the external function program block.
*
*
- * @param id
+ * @param id this field does nothing
*/
private void changeTmpOutput( long id )
{
ArrayList<DataIdentifier> outputParams = getOutputParams();
cell2BlockInst = getCell2BlockInstructions(outputParams, _blockedFileNames);
}
-
- /**
- *
- * @return
- */
+
public String getBaseDir()
{
return _baseDir;
@@ -156,7 +155,6 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Method to be invoked to execute instructions for the external function
* invocation
- * @throws DMLRuntimeException
*/
@Override
public void execute(ExecutionContext ec)
@@ -234,8 +232,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
* Given a list of parameters as data identifiers, returns a string
* representation.
*
- * @param params
- * @return
+ * @param params list of data identifiers
+ * @return parameter string
*/
protected String getParameterString(ArrayList<DataIdentifier> params) {
String parameterString = "";
@@ -274,7 +272,7 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
}
/**
- * method to get instructions
+ * method to create instructions
*/
protected void createInstructions() {
@@ -317,9 +315,10 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Method to generate a reblock job to convert the cell representation into block representation
- * @param outputParams
- * @param blockedFileNames
- * @return
+ *
+ * @param outputParams list out output data identifiers
+ * @param blockedFileNames map of blocked file names
+ * @return list of instructions
*/
private ArrayList<Instruction> getCell2BlockInstructions(
ArrayList<DataIdentifier> outputParams,
@@ -438,8 +437,9 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
* Method to generate instructions to convert input matrices from block to
* cell. We generate a GMR job here.
*
- * @param inputParams
- * @return
+ * @param inputParams list of data identifiers
+ * @param unBlockedFileNames map of unblocked file names
+ * @return list of instructions
*/
private ArrayList<Instruction> getBlock2CellInstructions(
ArrayList<DataIdentifier> inputParams,
@@ -564,9 +564,9 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Method to execute an external function invocation instruction.
*
- * @param ec
- * @param inst
- * @throws DMLRuntimeException
+ * @param ec execution context
+ * @param inst external function invocation instructions
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("unchecked")
public void executeInstruction(ExecutionContext ec, ExternalFunctionInvocationInstruction inst)
@@ -612,9 +612,10 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Method to verify that function outputs match with declared outputs
*
- * @param returnFunc
- * @param outputParams
- * @throws DMLRuntimeException
+ * @param ec execution context
+ * @param returnFunc package function
+ * @param outputParams output parameters
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
protected void verifyAndAttachOutputs(ExecutionContext ec, PackageFunction returnFunc,
String outputParams) throws DMLRuntimeException {
@@ -724,8 +725,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Method to get string representation of scalar value type
*
- * @param scalarType
- * @return
+ * @param scalarType scalar value type
+ * @return scalar value type string
*/
protected String getScalarValueTypeString(ScalarValueType scalarType) {
if (scalarType.equals(ScalarValueType.Text))
@@ -737,10 +738,9 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Method to parse inputs, update labels, and add to package function.
*
- * @param func
- * @param inputParams
- * @param metaData
- * @param variableMapping
+ * @param func package function
+ * @param inputParams input parameters
+ * @param variableMapping local variable map
*/
protected void setupInputs (PackageFunction func, String inputParams, LocalVariableMap variableMapping) {
ArrayList<String> inputs = getParameters(inputParams);
@@ -754,12 +754,10 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
* Method to convert string representation of input into function input
* object.
*
- * @param inputs
- * @param variableMapping
- * @param metaData
- * @return
+ * @param inputs list of inputs
+ * @param variableMapping local variable map
+ * @return list of function parameters
*/
-
protected ArrayList<FunctionParameter> getInputObjects(ArrayList<String> inputs,
LocalVariableMap variableMapping) {
ArrayList<FunctionParameter> inputObjects = new ArrayList<FunctionParameter>();
@@ -812,8 +810,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Converts string representation of scalar value type to enum type
*
- * @param string
- * @return
+ * @param string scalar value string
+ * @return scalar value type
*/
protected ScalarValueType getScalarValueType(String string) {
if (string.equals("String"))
@@ -825,8 +823,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Get string representation of matrix value type
*
- * @param t
- * @return
+ * @param t matrix value type
+ * @return matrix value type as string
*/
protected String getMatrixValueTypeString(Matrix.ValueType t) {
return t.toString();
@@ -835,8 +833,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Converts string representation of matrix value type into enum type
*
- * @param string
- * @return
+ * @param string matrix value type as string
+ * @return matrix value type
*/
protected Matrix.ValueType getMatrixValueType(String string) {
return Matrix.ValueType.valueOf(string);
@@ -846,8 +844,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
* Method to break the comma separated input parameters into an arraylist of
* parameters
*
- * @param inputParams
- * @return
+ * @param inputParams input parameters
+ * @return list of string inputs
*/
protected ArrayList<String> getParameters(String inputParams) {
ArrayList<String> inputs = new ArrayList<String>();
@@ -863,8 +861,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Get string representation for data type
*
- * @param d
- * @return
+ * @param d data type
+ * @return string representation of data type
*/
protected String getDataTypeString(DataType d) {
if (d.equals(DataType.MATRIX))
@@ -880,10 +878,10 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
}
/**
- * Method to get string representation of data type.
+ * Method to get string representation of function parameter type.
*
- * @param t
- * @return
+ * @param t function parameter type
+ * @return function parameter type as string
*/
protected String getFunctionParameterDataTypeString(FunctionParameterType t) {
return t.toString();
@@ -892,8 +890,8 @@ public class ExternalFunctionProgramBlock extends FunctionProgramBlock
/**
* Get string representation of value type
*
- * @param v
- * @return
+ * @param v value type
+ * @return value type string
*/
protected String getValueTypeString(ValueType v) {
if (v.equals(ValueType.DOUBLE))
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlockCP.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlockCP.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlockCP.java
index dac0389..1d7e5dd 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlockCP.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ExternalFunctionProgramBlockCP.java
@@ -46,7 +46,7 @@ import org.apache.sysml.udf.Matrix;
*
* Furthermore, it extends ExternalFunctionProgramBlock with a base directory in order
* to make it parallelizable, even in case of different JVMs. For this purpose every
- * external function must implement a <SET_BASE_DIR> method.
+ * external function must implement a <SET_BASE_DIR> method.
*
*
*/
@@ -61,8 +61,12 @@ public class ExternalFunctionProgramBlockCP extends ExternalFunctionProgramBlock
* functions. Remaining parameters will just be passed to constructor for
* function program block.
*
- * @param eFuncStat
- * @throws DMLRuntimeException
+ * @param prog runtime program
+ * @param inputParams list of input data identifiers
+ * @param outputParams list of output data identifiers
+ * @param otherParams map of other parameters
+ * @param baseDir base directory
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public ExternalFunctionProgramBlockCP(Program prog,
ArrayList<DataIdentifier> inputParams,
@@ -83,7 +87,6 @@ public class ExternalFunctionProgramBlockCP extends ExternalFunctionProgramBlock
/**
* Method to be invoked to execute instructions for the external function
* invocation
- * @throws DMLRuntimeException
*/
@Override
public void execute(ExecutionContext ec) throws DMLRuntimeException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
index b45ce37..be7bada 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ForProgramBlock.java
@@ -171,14 +171,6 @@ public class ForProgramBlock extends ProgramBlock
}
}
- /**
- *
- * @param pos
- * @param instructions
- * @param ec
- * @return
- * @throws DMLRuntimeException
- */
protected IntObject executePredicateInstructions( int pos, ArrayList<Instruction> instructions, ExecutionContext ec )
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
index 728aeff..cf8e73e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/FunctionProgramBlock.java
@@ -124,11 +124,7 @@ public class FunctionProgramBlock extends ProgramBlock
// check return values
checkOutputParameters(ec.getVariables());
}
-
- /**
- *
- * @param vars
- */
+
protected void checkOutputParameters( LocalVariableMap vars )
{
for( DataIdentifier diOut : _outputParams )
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
index 0d77364..d065aa5 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/IfProgramBlock.java
@@ -177,13 +177,7 @@ public class IfProgramBlock extends ProgramBlock
throw new DMLRuntimeException(this.printBlockErrorLocation() + "Error evaluating if exit instructions ", e);
}
}
-
- /**
- *
- * @param ec
- * @return
- * @throws DMLRuntimeException
- */
+
private BooleanObject executePredicate(ExecutionContext ec)
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java b/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
index 51eb669..136850c 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/LocalVariableMap.java
@@ -56,11 +56,7 @@ public class LocalVariableMap implements Cloneable
localMap = new HashMap <String, Data>(vars.localMap);
localID = _seq.getNextID();
}
-
- /**
- *
- * @return
- */
+
public Set<String> keySet()
{
return localMap.keySet();
@@ -69,7 +65,7 @@ public class LocalVariableMap implements Cloneable
/**
* Retrieves the data object given its name.
*
- * @param name : the variable name for the data object
+ * @param name the variable name for the data object
* @return the direct reference to the data object
*/
public Data get( String name )
@@ -81,57 +77,36 @@ public class LocalVariableMap implements Cloneable
* Adds a new (name, value) pair to the variable map, or replaces an old pair with
* the same name. Several different variable names may refer to the same value.
*
- * @param name : the variable name for the data value
- * @param val : the data value object (such as envelope)
+ * @param name the variable name for the data value
+ * @param val the data value object (such as envelope)
*/
public void put(String name, Data val)
{
localMap.put( name, val );
}
- /**
- *
- * @param vars
- */
public void putAll( LocalVariableMap vars )
{
if( vars == this || vars == null )
return;
localMap.putAll (vars.localMap);
}
-
- /**
- *
- * @param name
- */
+
public Data remove( String name )
{
return localMap.remove( name );
}
-
- /**
- *
- */
+
public void removeAll()
{
localMap.clear();
}
-
- /**
- *
- * @param d
- * @return
- */
+
public boolean hasReferences( Data d )
{
return localMap.containsValue(d);
}
- /**
- *
- * @param bo
- * @return
- */
public boolean hasReferences( LineageObject bo )
{
for( Data tmpdat : localMap.values() )
@@ -142,13 +117,7 @@ public class LocalVariableMap implements Cloneable
}
return false;
}
-
- /**
- *
- * @param d
- * @param earlyAbort
- * @return
- */
+
public int getNumReferences( Data d, boolean earlyAbort )
{
if ( d == null )
@@ -162,12 +131,7 @@ public class LocalVariableMap implements Cloneable
return refCount;
}
-
- /**
- *
- * @return
- * @throws DMLRuntimeException
- */
+
public String serialize()
throws DMLRuntimeException
{
@@ -184,13 +148,7 @@ public class LocalVariableMap implements Cloneable
return sb.toString();
}
-
- /**
- *
- * @param varStr
- * @return
- * @throws DMLRuntimeException
- */
+
public static LocalVariableMap deserialize(String varStr)
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
index 058e46e..91ee79e 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ParForProgramBlock.java
@@ -113,7 +113,7 @@ import org.apache.sysml.yarn.ropt.YarnClusterAnalyzer;
*
* NEW FUNCTIONALITIES (not for BI 2.0 release)
* TODO: reduction variables (operations: +=, -=, /=, *=, min, max)
- * TODO: papply(A,1:2,FUN) language construct (compiled to ParFOR) via DML function repository => modules OK, but second-order functions required
+ * TODO: papply(A,1:2,FUN) language construct (compiled to ParFOR) via DML function repository => modules OK, but second-order functions required
*
*/
public class ParForProgramBlock extends ForProgramBlock
@@ -154,8 +154,8 @@ public class ParForProgramBlock extends ForProgramBlock
* Note: Robust version of valueOf in order to return NONE without exception
* if misspelled or non-existing and for case-insensitivity.
*
- * @param s
- * @return
+ * @param s data partition format as string
+ * @return data partition format
*/
public static PDataPartitionFormat parsePDataPartitionFormat(String s) {
if (s.equalsIgnoreCase("ROW_WISE"))
@@ -303,9 +303,11 @@ public class ParForProgramBlock extends ForProgramBlock
* ParForProgramBlock constructor. It reads the specified parameter settings, where defaults for non-specified parameters
* have been set in ParForStatementBlock.validate(). Furthermore, it generates the IDs for the ParWorkers.
*
- * @param prog
- * @param iterPred
- * @throws DMLRuntimeException
+ * @param ID parfor program block id
+ * @param prog runtime program
+ * @param iterPredVars ?
+ * @param params map of parameters
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public ParForProgramBlock(int ID, Program prog, String[] iterPredVars, HashMap<String,String> params)
throws DMLRuntimeException
@@ -678,13 +680,13 @@ public class ParForProgramBlock extends ForProgramBlock
* This execution mode allows for arbitrary nested local parallelism and nested invocations of MR jobs. See
* below for details of the realization.
*
- * @param ec
- * @param itervar
- * @param from
- * @param to
- * @param incr
- * @throws DMLRuntimeException
- * @throws InterruptedException
+ * @param ec execution context
+ * @param itervar ?
+ * @param from ?
+ * @param to ?
+ * @param incr ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
+ * @throws InterruptedException if InterruptedException occurs
*/
private void executeLocalParFor( ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr )
throws DMLRuntimeException, InterruptedException
@@ -809,17 +811,7 @@ public class ParForProgramBlock extends ForProgramBlock
}
}
}
-
- /**
- *
- * @param ec
- * @param itervar
- * @param from
- * @param to
- * @param incr
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private void executeRemoteMRParFor( ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr )
throws DMLRuntimeException, IOException
{
@@ -907,17 +899,7 @@ public class ParForProgramBlock extends ForProgramBlock
StatisticMonitor.putPFStat(_ID, Stat.PARFOR_NUMITERS, numExecutedIterations);
}
}
-
- /**
- *
- * @param ec
- * @param itervar
- * @param from
- * @param to
- * @param incr
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private void executeRemoteMRParForDP( ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr )
throws DMLRuntimeException, IOException
{
@@ -990,16 +972,7 @@ public class ParForProgramBlock extends ForProgramBlock
StatisticMonitor.putPFStat(_ID, Stat.PARFOR_NUMITERS, numExecutedIterations);
}
}
-
- /**
- *
- * @param ec
- * @param itervar
- * @param from
- * @param to
- * @param incr
- * @throws DMLRuntimeException
- */
+
private void executeRemoteSparkParFor(ExecutionContext ec, IntObject itervar, IntObject from, IntObject to, IntObject incr)
throws DMLRuntimeException
{
@@ -1126,12 +1099,7 @@ public class ParForProgramBlock extends ForProgramBlock
StatisticMonitor.putPFStat(_ID, Stat.PARFOR_NUMITERS, numExecutedIterations);
}
}
-
- /**
- *
- * @param ec
- * @throws DMLRuntimeException
- */
+
private void handleDataPartitioning( ExecutionContext ec )
throws DMLRuntimeException
{
@@ -1196,12 +1164,7 @@ public class ParForProgramBlock extends ForProgramBlock
}
}
}
-
- /**
- *
- * @param ec
- * @throws DMLRuntimeException
- */
+
private void handleSparkRepartitioning( ExecutionContext ec )
throws DMLRuntimeException
{
@@ -1213,12 +1176,7 @@ public class ParForProgramBlock extends ForProgramBlock
sec.repartitionAndCacheMatrixObject(var);
}
}
-
- /**
- *
- * @param ec
- * @throws DMLRuntimeException
- */
+
private void handleSparkEagerCaching( ExecutionContext ec )
throws DMLRuntimeException
{
@@ -1233,9 +1191,11 @@ public class ParForProgramBlock extends ForProgramBlock
/**
* Cleanup result variables of parallel workers after result merge.
- * @param in
- * @param out
- * @throws DMLRuntimeException
+ *
+ * @param ec execution context
+ * @param out output matrix
+ * @param in array of input matrix objects
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void cleanWorkerResultVariables(ExecutionContext ec, MatrixObject out, MatrixObject[] in)
throws DMLRuntimeException
@@ -1255,9 +1215,9 @@ public class ParForProgramBlock extends ForProgramBlock
* NOTE: parfor gives no guarantees on the values of those objects - hence
* we return -1 for sclars and empty matrix objects.
*
- * @param out
- * @param sb
- * @throws DMLRuntimeException
+ * @param out local variable map
+ * @param sb statement block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private void createEmptyUnscopedVariables( LocalVariableMap out, StatementBlock sb )
throws DMLRuntimeException
@@ -1301,11 +1261,7 @@ public class ParForProgramBlock extends ForProgramBlock
out.put(var, dataObj);
}
}
-
- /**
- *
- * @throws CacheException
- */
+
private void exportMatricesToHDFS( ExecutionContext ec )
throws CacheException
{
@@ -1341,13 +1297,7 @@ public class ParForProgramBlock extends ForProgramBlock
}
}
}
-
- /**
- *
- * @param ec
- * @param varState
- * @throws DMLRuntimeException
- */
+
private void cleanupSharedVariables( ExecutionContext ec, HashMap<String,Boolean> varState )
throws DMLRuntimeException
{
@@ -1381,15 +1331,11 @@ public class ParForProgramBlock extends ForProgramBlock
* anyway on the next write. In case of recycling the deep copies of program blocks are recycled from previous
* executions of this parfor.
*
- *
- * @param pwID
- * @param queue
- * @param ec
- * @return
- * @throws InstantiationException
- * @throws IllegalAccessException
- * @throws DMLRuntimeException
- * @throws CloneNotSupportedException
+ * @param pwID parworker id
+ * @param queue task queue
+ * @param ec execution context
+ * @return local parworker
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private LocalParWorker createParallelWorker(long pwID, LocalTaskQueue<Task> queue, ExecutionContext ec)
throws DMLRuntimeException
@@ -1443,11 +1389,11 @@ public class ParForProgramBlock extends ForProgramBlock
/**
* Creates a new task partitioner according to the specified runtime parameter.
*
- * @param from
- * @param to
- * @param incr
- * @return
- * @throws DMLRuntimeException
+ * @param from ?
+ * @param to ?
+ * @param incr ?
+ * @return task partitioner
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private TaskPartitioner createTaskPartitioner( IntObject from, IntObject to, IntObject incr )
throws DMLRuntimeException
@@ -1493,11 +1439,11 @@ public class ParForProgramBlock extends ForProgramBlock
/**
* Creates a new data partitioner according to the specified runtime parameter.
*
- * @param dpf
- * @param dataPartitioner
- * @param ec
- * @return
- * @throws DMLRuntimeException
+ * @param dpf data partition format
+ * @param dataPartitioner data partitioner
+ * @param ec execution context
+ * @return data partitioner
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private DataPartitioner createDataPartitioner(PDataPartitionFormat dpf, PDataPartitioner dataPartitioner, ExecutionContext ec)
throws DMLRuntimeException
@@ -1533,16 +1479,7 @@ public class ParForProgramBlock extends ForProgramBlock
return dp;
}
-
- /**
- *
- * @param prm
- * @param out
- * @param in
- * @param fname
- * @return
- * @throws DMLRuntimeException
- */
+
private ResultMerge createResultMerge( PResultMerge prm, MatrixObject out, MatrixObject[] in, String fname, ExecutionContext ec )
throws DMLRuntimeException
{
@@ -1593,9 +1530,9 @@ public class ParForProgramBlock extends ForProgramBlock
* Recompile program block hierarchy to forced CP if MR instructions or functions.
* Returns true if recompile was necessary and possible
*
- * @param tid
- * @return
- * @throws DMLRuntimeException
+ * @param tid thread id
+ * @return true if recompile was necessary and possible
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
private boolean checkMRAndRecompileToCP(long tid)
throws DMLRuntimeException
@@ -1616,28 +1553,14 @@ public class ParForProgramBlock extends ForProgramBlock
Recompiler.recompileProgramBlockHierarchy2Forced(_childBlocks, tid, fnStack, ExecType.CP);
return true;
}
-
- /**
- *
- * @param tid
- * @throws DMLRuntimeException
- */
+
private void releaseForcedRecompile(long tid)
throws DMLRuntimeException
{
HashSet<String> fnStack = new HashSet<String>();
Recompiler.recompileProgramBlockHierarchy2Forced(_childBlocks, tid, fnStack, null);
}
-
-
- /**
- *
- * @param fname
- * @param tasks
- * @return
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private String writeTasksToFile(String fname, List<Task> tasks, int maxDigits)
throws DMLRuntimeException, IOException
{
@@ -1668,15 +1591,7 @@ public class ParForProgramBlock extends ForProgramBlock
return fname;
}
-
- /**
- *
- * @param fname
- * @param queue
- * @return
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
private String writeTasksToFile(String fname, LocalTaskQueue<Task> queue, int maxDigits)
throws DMLRuntimeException, IOException
{
@@ -1715,16 +1630,7 @@ public class ParForProgramBlock extends ForProgramBlock
String ret = t.toCompactString(maxDigits) + (flagFirst?" ":"") + "\n";
return ret;
}
-
- /**
- *
- * @param expIters
- * @param expTasks
- * @param numIters
- * @param numTasks
- * @param results
- * @throws DMLRuntimeException
- */
+
private void consolidateAndCheckResults(ExecutionContext ec, long expIters, long expTasks, long numIters, long numTasks, LocalVariableMap [] results)
throws DMLRuntimeException
{
@@ -1821,7 +1727,7 @@ public class ParForProgramBlock extends ForProgramBlock
*
* TODO The optimizer should explicitly decide about parallel result merge and its degree of parallelism.
*
- * @return
+ * @return true if ?
*/
private boolean checkParallelRemoteResultMerge()
{
@@ -1830,11 +1736,7 @@ public class ParForProgramBlock extends ForProgramBlock
&& ( _resultMerge == PResultMerge.REMOTE_MR
||_resultMerge == PResultMerge.REMOTE_SPARK) );
}
-
- /**
- *
- * @param IDPrefix
- */
+
private void setParForProgramBlockIDs(int IDPrefix)
{
_IDPrefix = IDPrefix;
@@ -1869,24 +1771,11 @@ public class ParForProgramBlock extends ForProgramBlock
}
}
- /**
- *
- * @param from
- * @param to
- * @param incr
- */
private long computeNumIterations( IntObject from, IntObject to, IntObject incr )
{
return (long)Math.ceil(((double)(to.getLongValue() - from.getLongValue() + 1)) / incr.getLongValue());
}
-
- /**
- *
- * @param iterVarName
- * @param from
- * @param to
- * @param incr
- */
+
private void updateIterablePredicateVars(String iterVarName, IntObject from, IntObject to, IntObject incr)
{
_numIterations = computeNumIterations(from, to, incr);
@@ -1900,10 +1789,7 @@ public class ParForProgramBlock extends ForProgramBlock
_iterablePredicateVars[2] = to.getStringValue();
_iterablePredicateVars[3] = incr.getStringValue();
}
-
- /**
- *
- */
+
private void resetIterablePredicateVars()
{
//reset of modified for optimization (opt!=NONE)
@@ -1915,7 +1801,7 @@ public class ParForProgramBlock extends ForProgramBlock
* NOTE: Only required for remote parfor. Hence, there is no need to transfer DMLConfig to
* the remote workers (MR job) since nested remote parfor is not supported.
*
- * @return
+ * @return task file name
*/
private String constructTaskFileName()
{
@@ -1935,7 +1821,7 @@ public class ParForProgramBlock extends ForProgramBlock
* NOTE: Only required for remote parfor. Hence, there is no need to transfer DMLConfig to
* the remote workers (MR job) since nested remote parfor is not supported.
*
- * @return
+ * @return result file name
*/
private String constructResultFileName()
{
@@ -1951,10 +1837,6 @@ public class ParForProgramBlock extends ForProgramBlock
return sb.toString();
}
- /**
- *
- * @return
- */
private String constructResultMergeFileName()
{
String scratchSpaceLoc = ConfigurationManager.getScratchSpace();
@@ -1972,11 +1854,7 @@ public class ParForProgramBlock extends ForProgramBlock
return sb.toString();
}
-
- /**
- *
- * @return
- */
+
private String constructDataPartitionsFileName()
{
String scratchSpaceLoc = ConfigurationManager.getScratchSpace();
@@ -1995,10 +1873,6 @@ public class ParForProgramBlock extends ForProgramBlock
return sb.toString();
}
- /**
- *
- * @return
- */
private long getMinMemory(ExecutionContext ec)
{
long ret = -1;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java b/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
index 7a35ec7..95b2e01 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/Program.java
@@ -43,12 +43,6 @@ public class Program
_programBlocks = new ArrayList<ProgramBlock>();
}
- /**
- *
- * @param namespace
- * @param fname
- * @param fpb
- */
public synchronized void addFunctionProgramBlock(String namespace, String fname, FunctionProgramBlock fpb)
{
if (namespace == null)
@@ -63,12 +57,7 @@ public class Program
namespaceBlocks.put(fname,fpb);
}
-
- /**
- *
- * @param namespace
- * @param fname
- */
+
public synchronized void removeFunctionProgramBlock(String namespace, String fname)
{
if (namespace == null)
@@ -81,11 +70,7 @@ public class Program
namespaceBlocks.remove(fname);
}
}
-
- /**
- *
- * @return
- */
+
public synchronized HashMap<String,FunctionProgramBlock> getFunctionProgramBlocks(){
HashMap<String,FunctionProgramBlock> retVal = new HashMap<String,FunctionProgramBlock>();
@@ -103,14 +88,7 @@ public class Program
return retVal;
}
-
- /**
- *
- * @param namespace
- * @param fname
- * @return
- * @throws DMLRuntimeException
- */
+
public synchronized FunctionProgramBlock getFunctionProgramBlock(String namespace, String fname) throws DMLRuntimeException{
if (namespace == null) namespace = DMLProgram.DEFAULT_NAMESPACE;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
index 0137071..e1986c8 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/ProgramBlock.java
@@ -128,8 +128,8 @@ public class ProgramBlock
/**
* Executes this program block (incl recompilation if required).
*
- * @param ec
- * @throws DMLRuntimeException
+ * @param ec execution context
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void execute(ExecutionContext ec)
throws DMLRuntimeException
@@ -171,10 +171,13 @@ public class ProgramBlock
/**
* Executes given predicate instructions (incl recompilation if required)
*
- * @param inst
- * @param hops
- * @param ec
- * @throws DMLRuntimeException
+ * @param inst list of instructions
+ * @param hops high-level operator
+ * @param requiresRecompile true if requires recompile
+ * @param retType value type of the return type
+ * @param ec execution context
+ * @return scalar object
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public ScalarObject executePredicate(ArrayList<Instruction> inst, Hop hops, boolean requiresRecompile, ValueType retType, ExecutionContext ec)
throws DMLRuntimeException
@@ -205,12 +208,6 @@ public class ProgramBlock
return executePredicateInstructions(tmp, retType, ec);
}
- /**
- *
- * @param inst
- * @param ec
- * @throws DMLRuntimeException
- */
protected void executeInstructions(ArrayList<Instruction> inst, ExecutionContext ec)
throws DMLRuntimeException
{
@@ -224,13 +221,7 @@ public class ProgramBlock
executeSingleInstruction(currInst, ec);
}
}
-
- /**
- *
- * @param inst
- * @param ec
- * @throws DMLRuntimeException
- */
+
protected ScalarObject executePredicateInstructions(ArrayList<Instruction> inst, ValueType retType, ExecutionContext ec)
throws DMLRuntimeException
{
@@ -282,13 +273,7 @@ public class ProgramBlock
return ret;
}
-
- /**
- *
- *
- * @param currInst
- * @throws DMLRuntimeException
- */
+
private void executeSingleInstruction( Instruction currInst, ExecutionContext ec )
throws DMLRuntimeException
{
@@ -339,14 +324,7 @@ public class ProgramBlock
}
}
}
-
- /**
- *
- * @param ec
- * @return
- * @throws DMLRuntimeException
- */
protected UpdateType[] prepareUpdateInPlaceVariables(ExecutionContext ec, long tid)
throws DMLRuntimeException
{
@@ -377,13 +355,7 @@ public class ProgramBlock
return flags;
}
-
- /**
- *
- * @param ec
- * @param flags
- * @throws DMLRuntimeException
- */
+
protected void resetUpdateInPlaceVariableFlags(ExecutionContext ec, UpdateType[] flags)
throws DMLRuntimeException
{
@@ -398,23 +370,12 @@ public class ProgramBlock
mo.setUpdateType(flags[i]);
}
}
-
- /**
- *
- * @param inst
- * @return
- */
+
private boolean isRemoveVariableInstruction(Instruction inst)
{
return ( inst instanceof VariableCPInstruction && ((VariableCPInstruction)inst).isRemoveVariable() );
}
-
- /**
- *
- * @param lastInst
- * @param vars
- * @throws DMLRuntimeException
- */
+
private void checkSparsity( Instruction lastInst, LocalVariableMap vars )
throws DMLRuntimeException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
index 166832a..a24dff3 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/ByteBuffer.java
@@ -48,12 +48,7 @@ public class ByteBuffer
_size = size;
_serialized = false;
}
-
- /**
- *
- * @param mb
- * @throws IOException
- */
+
public void serializeBlock( CacheBlock cb )
throws IOException
{
@@ -84,12 +79,7 @@ public class ByteBuffer
_serialized = true;
}
-
- /**
- *
- * @return
- * @throws IOException
- */
+
public CacheBlock deserializeBlock()
throws IOException
{
@@ -107,12 +97,7 @@ public class ByteBuffer
return ret;
}
-
- /**
- *
- * @param fname
- * @throws IOException
- */
+
public void evictBuffer( String fname )
throws IOException
{
@@ -129,16 +114,12 @@ public class ByteBuffer
/**
* Returns the buffer size in bytes.
*
- * @return
+ * @return buffer size in bytes
*/
public long getSize() {
return _size;
}
-
- /**
- *
- * @return
- */
+
public boolean isShallow() {
return _shallow;
}
@@ -155,10 +136,7 @@ public class ByteBuffer
_cdata = null;
}
}
-
- /**
- *
- */
+
public void checkSerialized()
{
//check if already serialized
@@ -176,9 +154,9 @@ public class ByteBuffer
* This call is consistent with 'serializeBlock' and allows for internal optimization
* according to dense/sparse representation.
*
- * @param size
- * @param mb
- * @return
+ * @param size the size
+ * @param cb cache block
+ * @return true if valid capacity
*/
public static boolean isValidCapacity( long size, CacheBlock cb )
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlock.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlock.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlock.java
index b73584c..eb34b09 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlock.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlock.java
@@ -30,27 +30,22 @@ import org.apache.sysml.runtime.DMLRuntimeException;
*/
public interface CacheBlock extends Writable
{
- /**
- *
- * @return
- */
+
public int getNumRows();
-
- /**
- *
- * @return
- */
+
public int getNumColumns();
/**
* Get the in-memory size in bytes of the cache block.
- * @return
+ *
+ * @return in-memory size in bytes of cache block
*/
public long getInMemorySize();
/**
* Get the exact serialized size in bytes of the cache block.
- * @return
+ *
+ * @return exact serialized size in bytes of cache block
*/
public long getExactSerializedSize();
@@ -59,7 +54,7 @@ public interface CacheBlock extends Writable
* which is generally true if in-memory size and serialized size
* are almost identical allowing to avoid unnecessary deep serialize.
*
- * @return
+ * @return true if shallow serialized
*/
public boolean isShallowSerialize();
@@ -72,13 +67,13 @@ public interface CacheBlock extends Writable
* Slice a sub block out of the current block and write into the given output block.
* This method returns the passed instance if not null.
*
- * @param rl
- * @param ru
- * @param cl
- * @param cu
- * @param block
- * @return
- * @throws DMLRuntimeException
+ * @param rl row lower
+ * @param ru row upper
+ * @param cl column lower
+ * @param cu column upper
+ * @param block cache block
+ * @return sub-block of cache block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public CacheBlock sliceOperations(int rl, int ru, int cl, int cu, CacheBlock block)
throws DMLRuntimeException;
@@ -87,9 +82,9 @@ public interface CacheBlock extends Writable
* Merge the given block into the current block. Both blocks needs to be of equal
* dimensions and contain disjoint non-zero cells.
*
- * @param that
- * @param appendOnly
- * @throws DMLRuntimeException
+ * @param that cache block
+ * @param appendOnly ?
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void merge(CacheBlock that, boolean appendOnly)
throws DMLRuntimeException;
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlockFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlockFactory.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlockFactory.java
index 9595441..5d52e4a 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlockFactory.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheBlockFactory.java
@@ -33,11 +33,6 @@ import org.apache.sysml.runtime.matrix.data.Pair;
*/
public class CacheBlockFactory
{
- /**
- *
- * @param code
- * @return
- */
public static CacheBlock newInstance(int code) {
switch( code ) {
case 0: return new MatrixBlock();
@@ -45,12 +40,7 @@ public class CacheBlockFactory
}
throw new RuntimeException("Unsupported cache block type: "+code);
}
-
- /**
- *
- * @param block
- * @return
- */
+
public static int getCode(CacheBlock block) {
if( block instanceof MatrixBlock )
return 0;
@@ -58,12 +48,7 @@ public class CacheBlockFactory
return 1;
throw new RuntimeException("Unsupported cache block type: "+block.getClass().getName());
}
-
- /**
- *
- * @param block
- * @return
- */
+
public static ArrayList<?> getPairList(CacheBlock block) {
int code = getCode(block);
switch( code ) {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataInput.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataInput.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataInput.java
index bc81361..24df6d4 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataInput.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataInput.java
@@ -195,13 +195,7 @@ public class CacheDataInput implements DataInput, MatrixBlockDataInput
return nnz;
}
-
- /**
- *
- * @param a
- * @param off
- * @return
- */
+
private static int baToInt( byte[] ba, final int off )
{
//shift and add 4 bytes into single int
@@ -210,13 +204,7 @@ public class CacheDataInput implements DataInput, MatrixBlockDataInput
((ba[off+2] & 0xFF) << 8) +
((ba[off+3] & 0xFF) << 0);
}
-
- /**
- *
- * @param a
- * @param off
- * @return
- */
+
private static long baToLong( byte[] ba, final int off )
{
//shift and add 8 bytes into single long
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataOutput.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataOutput.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataOutput.java
index c74516c..b9ed0a8 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataOutput.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheDataOutput.java
@@ -199,26 +199,14 @@ public class CacheDataOutput implements DataOutput, MatrixBlockDataOutput
for( int i=lrlen; i<rlen; i++ )
writeInt( 0 );
}
-
- /**
- *
- * @param val
- * @param ba
- * @param off
- */
+
private static void shortToBa( final int val, byte[] ba, final int off )
{
//shift and mask out 2 bytes
ba[ off+0 ] = (byte)((val >>> 8) & 0xFF);
ba[ off+1 ] = (byte)((val >>> 0) & 0xFF);
}
-
- /**
- *
- * @param val
- * @param ba
- * @param off
- */
+
private static void intToBa( final int val, byte[] ba, final int off )
{
//shift and mask out 4 bytes
@@ -227,13 +215,7 @@ public class CacheDataOutput implements DataOutput, MatrixBlockDataOutput
ba[ off+2 ] = (byte)((val >>> 8) & 0xFF);
ba[ off+3 ] = (byte)((val >>> 0) & 0xFF);
}
-
- /**
- *
- * @param val
- * @param ba
- * @param off
- */
+
private static void longToBa( final long val, byte[] ba, final int off )
{
//shift and mask out 8 bytes
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
index d3addd6..c36b8ca 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/CacheableData.java
@@ -185,8 +185,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
/**
* Basic constructor for any cacheable data.
*
- * @param dt
- * @param vt
+ * @param dt data type
+ * @param vt value type
*/
protected CacheableData(DataType dt, ValueType vt) {
super (dt, vt);
@@ -198,7 +198,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
/**
* Copy constructor for cacheable data (of same type).
*
- * @param that
+ * @param that cacheable data object
*/
protected CacheableData(CacheableData<T> that) {
this( that.getDataType(), that.getValueType() );
@@ -214,7 +214,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* Enables or disables the cleanup of the associated
* data object on clearData().
*
- * @param flag
+ * @param flag true if cleanup
*/
public void enableCleanup(boolean flag) {
_cleanupFlag = flag;
@@ -224,56 +224,32 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* Indicates if cleanup of the associated data object
* is enabled on clearData().
*
- * @return
+ * @return true if cleanup enabled
*/
public boolean isCleanupEnabled() {
return _cleanupFlag;
}
-
- /**
- *
- * @param s
- */
+
public void setVarName(String s) {
_varName = s;
}
-
- /**
- *
- * @return
- */
+
public String getVarName() {
return _varName;
}
-
- /**
- *
- * @return
- */
+
public boolean isHDFSFileExists() {
return _hdfsFileExists;
}
-
- /**
- *
- * @param flag
- */
+
public void setHDFSFileExists( boolean flag ) {
_hdfsFileExists = flag;
}
-
- /**
- *
- * @return
- */
+
public String getFileName() {
return _hdfsFileName;
}
- /**
- *
- * @param file
- */
public synchronized void setFileName( String file ) {
if( _hdfsFileName!=null && !_hdfsFileName.equals(file) )
if( !isEmpty(true) )
@@ -285,31 +261,21 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* <code>true</code> if the in-memory or evicted matrix may be different from
* the matrix located at {@link #_hdfsFileName}; <code>false</code> if the two
* matrices are supposed to be the same.
+ *
+ * @return true if dirty
*/
public boolean isDirty() {
return _dirtyFlag;
}
-
- /**
- *
- * @param flag
- */
+
public void setDirty(boolean flag) {
_dirtyFlag = flag;
}
-
- /**
- *
- * @return
- */
+
public FileFormatProperties getFileFormatProperties() {
return _formatProps;
}
-
- /**
- *
- * @param props
- */
+
public void setFileFormatProperties(FileFormatProperties props) {
_formatProps = props;
}
@@ -333,25 +299,14 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
MatrixDimensionsMetaData meta = (MatrixDimensionsMetaData) _metaData;
return meta.getMatrixCharacteristics();
}
-
- /**
- *
- */
+
public abstract void refreshMetaData()
throws CacheException;
-
- /**
- *
- * @return
- */
+
public RDDObject getRDDHandle() {
return _rddHandle;
}
-
- /**
- *
- * @param rdd
- */
+
public void setRDDHandle( RDDObject rdd ) {
//cleanup potential old back reference
if( _rddHandle != null )
@@ -366,11 +321,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
public BroadcastObject<T> getBroadcastHandle() {
return _bcHandle;
}
-
- /**
- *
- * @param bc
- */
+
@SuppressWarnings({ "rawtypes", "unchecked" })
public void setBroadcastHandle( BroadcastObject bc ) {
//cleanup potential old back reference
@@ -382,11 +333,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
if( _bcHandle != null )
bc.setBackReference(this);
}
-
- /**
- *
- * @return
- */
+
public GPUObject getGPUObject() {
return _gpuHandle;
}
@@ -413,8 +360,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* In-Status: EMPTY, EVICTABLE, EVICTED, READ;
* Out-Status: READ(+1).
*
- * @return
- * @throws CacheException
+ * @return cacheable data
+ * @throws CacheException if CacheException occurs
*/
public synchronized T acquireRead()
throws CacheException
@@ -504,8 +451,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* In-Status: EMPTY, EVICTABLE, EVICTED;
* Out-Status: MODIFY.
*
- * @return
- * @throws CacheException
+ * @return cacheable data
+ * @throws CacheException if CacheException occurs
*/
public synchronized T acquireModify()
throws CacheException
@@ -561,9 +508,9 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* In-Status: EMPTY, EVICTABLE, EVICTED;
* Out-Status: MODIFY.
*
- * @param newData
- * @return
- * @throws CacheException
+ * @param newData new data
+ * @return cacheable data
+ * @throws CacheException if CacheException occurs
*/
public synchronized T acquireModify(T newData)
throws CacheException
@@ -608,7 +555,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* In-Status: READ, MODIFY;
* Out-Status: READ(-1), EVICTABLE, EMPTY.
*
- * @throws CacheException
+ * @throws CacheException if CacheException occurs
*/
public synchronized void release()
throws CacheException
@@ -676,7 +623,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
*
* In-Status: EMPTY, EVICTABLE, EVICTED;
* Out-Status: EMPTY.
- * @throws CacheException
+ *
+ * @throws CacheException if CacheException occurs
*/
public synchronized void clearData()
throws CacheException
@@ -713,11 +661,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
setDirty(false);
setEmpty();
}
-
- /**
- *
- * @throws CacheException
- */
+
public synchronized void exportData() throws CacheException {
exportData( -1 );
}
@@ -728,7 +672,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* In-Status: EMPTY, EVICTABLE, EVICTED, READ;
* Out-Status: EMPTY, EVICTABLE, EVICTED, READ.
*
- * @throws CacheException
+ * @param replication ?
+ * @throws CacheException if CacheException occurs
*/
public synchronized void exportData( int replication )
throws CacheException
@@ -737,25 +682,12 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
_hdfsFileExists = true;
}
- /**
- *
- * @param fName
- * @param outputFormat
- * @throws CacheException
- */
public synchronized void exportData(String fName, String outputFormat)
throws CacheException
{
exportData(fName, outputFormat, -1, null);
}
-
- /**
- *
- * @param fName
- * @param outputFormat
- * @param formatProperties
- * @throws CacheException
- */
+
public synchronized void exportData(String fName, String outputFormat, FileFormatProperties formatProperties)
throws CacheException
{
@@ -773,9 +705,11 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* the output format and most importantly would bypass reblocking during write (which effects the
* potential degree of parallelism). However, we copy files on HDFS if certain criteria are given.
*
- * @param fName
- * @param outputFormat
- * @throws CacheException
+ * @param fName file name
+ * @param outputFormat format
+ * @param replication ?
+ * @param formatProperties file format properties
+ * @throws CacheException if CacheException occurs
*/
public synchronized void exportData (String fName, String outputFormat, int replication, FileFormatProperties formatProperties)
throws CacheException
@@ -910,7 +844,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* Low-level cache I/O method that physically restores the data blob to
* main memory. Must be defined by a subclass, never called by users.
*
- * @throws CacheException
+ * @throws CacheException if CacheException occurs
*/
protected void restoreBlobIntoMemory()
throws CacheException
@@ -939,11 +873,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
if( LOG.isTraceEnabled() )
LOG.trace("Restoring matrix - COMPLETED ... " + (System.currentTimeMillis()-begin) + " msec.");
}
- /**
- *
- * @param fname
- * @return
- */
+
protected abstract T readBlobFromCache(String fname)
throws IOException;
@@ -964,10 +894,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
if( LOG.isTraceEnabled() )
LOG.trace("Freeing evicted matrix - COMPLETED ... " + (System.currentTimeMillis()-begin) + " msec.");
}
-
- /**
- *
- */
+
protected boolean isBelowCachingThreshold() {
return (_data.getInMemorySize() <= CACHING_THRESHOLD);
}
@@ -975,10 +902,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
protected ValueType[] getSchema() {
return null;
}
-
- /**
- *
- */
+
@Override //Data
public synchronized String getDebugName() {
int maxLength = 23;
@@ -988,12 +912,6 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
return getVarName() + " " + debugNameEnding;
}
- /**
- *
- * @param fname
- * @return
- * @throws IOException
- */
protected T readBlobFromHDFS(String fname)
throws IOException
{
@@ -1001,60 +919,19 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
MatrixCharacteristics mc = iimd.getMatrixCharacteristics();
return readBlobFromHDFS(fname, mc.getRows(), mc.getCols());
}
-
- /**
- *
- * @param fname
- * @param rlen
- * @param clen
- * @return
- * @throws IOException
- */
+
protected abstract T readBlobFromHDFS(String fname, long rlen, long clen)
throws IOException;
-
- /**
- *
- * @param rdd
- * @param status
- * @return
- * @throws IOException
- */
+
protected abstract T readBlobFromRDD(RDDObject rdd, MutableBoolean status)
throws IOException;
-
- /**
- *
- * @param fname
- * @param ofmt
- * @param rep
- * @param fprop
- * @throws IOException
- * @throws DMLRuntimeException
- */
+
protected abstract void writeBlobToHDFS(String fname, String ofmt, int rep, FileFormatProperties fprop)
throws IOException, DMLRuntimeException;
-
- /**
- *
- * @param rdd
- * @param fname
- * @param ofmt
- * @throws IOException
- * @throws DMLRuntimeException
- */
+
protected abstract void writeBlobFromRDDtoHDFS(RDDObject rdd, String fname, String ofmt)
throws IOException, DMLRuntimeException;
-
-
- /**
- *
- * @param filePathAndName
- * @param outputFormat
- * @param formatProperties
- * @throws DMLRuntimeException
- * @throws IOException
- */
+
protected void writeMetaData (String filePathAndName, String outputFormat, FileFormatProperties formatProperties)
throws DMLRuntimeException, IOException
{
@@ -1084,12 +961,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
getSchema(), dataType, mc, oinfo, formatProperties);
}
}
-
- /**
- *
- * @param outputFormat
- * @return
- */
+
protected boolean isEqualOutputFormat( String outputFormat )
{
boolean ret = true;
@@ -1115,10 +987,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
protected int getUniqueCacheID() {
return _uniqueID;
}
-
- /**
- *
- */
+
protected String getCacheFilePathAndName () {
if( _cacheFileName==null ) {
StringBuilder sb = new StringBuilder();
@@ -1151,7 +1020,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
*
* @param isModify : <code>true</code> for the exclusive "modify" lock,
* <code>false</code> for a shared "read" lock.
- * @throws CacheException
+ * @param restore true if restore
+ * @throws CacheException if CacheException occurs
*/
protected void acquire (boolean isModify, boolean restore)
throws CacheException
@@ -1189,11 +1059,12 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
* It is expected that you eliminate all external references to the blob
* prior to calling this method, because otherwise eviction will
* duplicate the blob, but not release memory. This method has to be
- * called only once per process and coupled with {@link #acquire(boolean)},
+ * called only once per process and coupled with {@link #acquire(boolean, boolean)},
* because it decrements the lock count and the other method increments
* the lock count.
*
- * @throws CacheException
+ * @param cacheNoWrite ?
+ * @throws CacheException if CacheException occurs
*/
protected void release(boolean cacheNoWrite)
throws CacheException
@@ -1329,11 +1200,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
_cache = null;
}
}
-
- /**
- *
- * @param add
- */
+
protected void updateStatusPinned(boolean add) {
if( _data != null ) { //data should never be null
long size = sizePinned.get();
@@ -1341,20 +1208,13 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
sizePinned.set( Math.max(size,0) );
}
}
-
- /**
- *
- * @return
- */
+
protected long getPinnedSize() {
return sizePinned.get();
}
// --------- STATIC CACHE INIT/CLEANUP OPERATIONS ----------
-
- /**
- *
- */
+
public synchronized static void cleanupCacheDir() {
//cleanup remaining cached writes
LazyWriteBuffer.cleanup();
@@ -1366,7 +1226,7 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
/**
* Deletes the DML-script-specific caching working dir.
*
- * @param withDir
+ * @param withDir if true, delete directory
*/
public synchronized static void cleanupCacheDir(boolean withDir)
{
@@ -1392,7 +1252,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
/**
* Inits caching with the default uuid of DMLScript
- * @throws IOException
+ *
+ * @throws IOException if IOException occurs
*/
public synchronized static void initCaching()
throws IOException
@@ -1405,7 +1266,8 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
*
* Takes the UUID in order to allow for custom uuid, e.g., for remote parfor caching
*
- * @throws IOException
+ * @param uuid ID
+ * @throws IOException if IOException occurs
*/
public synchronized static void initCaching( String uuid )
throws IOException
@@ -1439,13 +1301,6 @@ public abstract class CacheableData<T extends CacheBlock> extends Data
_activeFlag = true;
}
- /**
- *
- * @param fName
- * @param outputFormat
- * @return
- * @throws CacheException
- */
public synchronized boolean moveData(String fName, String outputFormat)
throws CacheException
{
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
index d3fb74c..4cf3d7f 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/FrameObject.java
@@ -50,41 +50,22 @@ public class FrameObject extends CacheableData<FrameBlock>
private static final long serialVersionUID = 1755082174281927785L;
private ValueType[] _schema = null;
-
- /**
- *
- */
+
protected FrameObject() {
super(DataType.FRAME, ValueType.STRING);
}
-
- /**
- *
- * @param fname
- */
+
public FrameObject(String fname) {
this();
setFileName(fname);
}
-
- /**
- *
- * @param fname
- * @param meta
- */
+
public FrameObject(String fname, MetaData meta) {
this();
setFileName(fname);
setMetaData(meta);
}
-
- /**
- *
- * @param fname
- * @param meta
- * @param schema
- *
- */
+
public FrameObject(String fname, MetaData meta, ValueType[] schema) {
this();
setFileName(fname);
@@ -95,7 +76,7 @@ public class FrameObject extends CacheableData<FrameBlock>
/**
* Copy constructor that copies meta data but NO data.
*
- * @param fo
+ * @param fo frame object
*/
public FrameObject(FrameObject fo) {
super(fo);
@@ -107,10 +88,11 @@ public class FrameObject extends CacheableData<FrameBlock>
}
/**
+ * Obtain schema of value types
*
* @param cl column lower bound, inclusive
* @param cu column upper bound, inclusive
- * @return
+ * @return schema of value types
*/
public ValueType[] getSchema(int cl, int cu) {
return (_schema!=null && _schema.length>cu) ? Arrays.copyOfRange(_schema, cl, cu+1) :
@@ -121,8 +103,8 @@ public class FrameObject extends CacheableData<FrameBlock>
* Creates a new collection which contains the schema of the current
* frame object concatenated with the schema of the passed frame object.
*
- * @param fo
- * @return
+ * @param fo frame object
+ * @return schema of value types
*/
public ValueType[] mergeSchemas(FrameObject fo) {
return (ValueType[]) ArrayUtils.addAll(
@@ -165,20 +147,12 @@ public class FrameObject extends CacheableData<FrameBlock>
//update schema information
_schema = _data.getSchema();
}
-
- /**
- *
- * @return
- */
+
public long getNumRows() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return mc.getRows();
}
- /**
- *
- * @return
- */
public long getNumColumns() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return mc.getCols();
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/LazyWriteBuffer.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/LazyWriteBuffer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/LazyWriteBuffer.java
index 0aad717..3447727 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/LazyWriteBuffer.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/LazyWriteBuffer.java
@@ -30,10 +30,6 @@ import org.apache.sysml.api.DMLScript;
import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer;
import org.apache.sysml.runtime.util.LocalFileUtils;
-/**
- *
- *
- */
public class LazyWriteBuffer
{
public enum RPolicy {
@@ -59,13 +55,7 @@ public class LazyWriteBuffer
long maxMem = InfrastructureAnalyzer.getLocalMaxMemory();
_limit = (long)(CacheableData.CACHING_BUFFER_SIZE * maxMem);
}
-
- /**
- *
- * @param fname
- * @param mb
- * @throws IOException
- */
+
public static void writeBlock( String fname, CacheBlock cb )
throws IOException
{
@@ -125,11 +115,7 @@ public class LazyWriteBuffer
CacheStatistics.incrementFSWrites();
}
}
-
- /**
- *
- * @param fname
- */
+
public static void deleteBlock( String fname )
{
boolean requiresDelete = true;
@@ -149,13 +135,7 @@ public class LazyWriteBuffer
if( requiresDelete )
_fClean.deleteFile(fname);
}
-
- /**
- *
- * @param fname
- * @return
- * @throws IOException
- */
+
public static CacheBlock readBlock( String fname, boolean matrix )
throws IOException
{
@@ -193,10 +173,7 @@ public class LazyWriteBuffer
return cb;
}
-
- /**
- *
- */
+
public static void init() {
_mQueue = new EvictionQueue();
_fClean = new FileCleaner();
@@ -204,10 +181,7 @@ public class LazyWriteBuffer
if( CacheableData.CACHING_BUFFER_PAGECACHE )
PageCache.init();
}
-
- /**
- *
- */
+
public static void cleanup() {
if( _mQueue != null )
_mQueue.clear();
@@ -216,11 +190,7 @@ public class LazyWriteBuffer
if( CacheableData.CACHING_BUFFER_PAGECACHE )
PageCache.clear();
}
-
- /**
- *
- * @return
- */
+
public static long getWriteBufferSize() {
long maxMem = InfrastructureAnalyzer.getLocalMaxMemory();
return (long)(CacheableData.CACHING_BUFFER_SIZE * maxMem);
@@ -230,6 +200,7 @@ public class LazyWriteBuffer
* Print current status of buffer pool, including all entries.
* NOTE: use only for debugging or testing.
*
+ * @param position the position
*/
public static void printStatus( String position )
{
@@ -255,9 +226,9 @@ public class LazyWriteBuffer
/**
* Evicts all buffer pool entries.
- * NOTE: use only for debugging or testing.
- * @throws IOException
+ * NOTE: use only for debugging or testing.
*
+ * @throws IOException if IOException occurs
*/
public static void forceEviction()
throws IOException
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
index aad660e..40cae0c 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/MatrixObject.java
@@ -82,14 +82,21 @@ public class MatrixObject extends CacheableData<MatrixBlock>
private MatrixBlock _partitionInMemory = null;
/**
- * Constructor that takes only the HDFS filename.
+ * Constructor that takes the value type and the HDFS filename.
+ *
+ * @param vt value type
+ * @param file file name
*/
public MatrixObject (ValueType vt, String file) {
this (vt, file, null); //HDFS file path
}
/**
- * Constructor that takes both HDFS filename and associated metadata.
+ * Constructor that takes the value type, HDFS filename and associated metadata.
+ *
+ * @param vt value type
+ * @param file file name
+ * @param mtd metadata
*/
public MatrixObject( ValueType vt, String file, MetaData mtd ) {
super (DataType.MATRIX, vt);
@@ -102,7 +109,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
/**
* Copy constructor that copies meta data but NO data.
*
- * @param mo
+ * @param mo matrix object
*/
public MatrixObject( MatrixObject mo )
{
@@ -119,20 +126,11 @@ public class MatrixObject extends CacheableData<MatrixBlock>
_partitionSize = mo._partitionSize;
_partitionCacheName = mo._partitionCacheName;
}
-
- /**
- *
- * @param flag
- */
public void setUpdateType(UpdateType flag) {
_updateType = flag;
}
-
- /**
- *
- * @return
- */
+
public UpdateType getUpdateType() {
return _updateType;
}
@@ -144,7 +142,8 @@ public class MatrixObject extends CacheableData<MatrixBlock>
/**
* Make the matrix metadata consistent with the in-memory matrix data
- * @throws CacheException
+ *
+ * @throws CacheException if CacheException occurs
*/
@Override
public void refreshMetaData()
@@ -159,56 +158,32 @@ public class MatrixObject extends CacheableData<MatrixBlock>
_data.getNumColumns() );
mc.setNonZeros( _data.getNonZeros() );
}
-
- /**
- *
- * @return
- */
+
public long getNumRows() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return mc.getRows ();
}
- /**
- *
- * @return
- */
public long getNumColumns() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return mc.getCols ();
}
- /**
- *
- * @return
- */
public long getNumRowsPerBlock() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return mc.getRowsPerBlock();
}
-
- /**
- *
- * @return
- */
+
public long getNumColumnsPerBlock() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return mc.getColsPerBlock();
}
-
- /**
- *
- * @return
- */
+
public long getNnz() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return mc.getNonZeros();
}
-
- /**
- *
- * @return
- */
+
public double getSparsity() {
MatrixCharacteristics mc = getMatrixCharacteristics();
return ((double)mc.getNonZeros())/mc.getRows()/mc.getCols();
@@ -231,11 +206,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
// *** (all other methods still usable) ***
// *** ***
// *********************************************
-
- /**
- * @param n
- *
- */
+
public void setPartitioned( PDataPartitionFormat format, int n )
{
_partitioned = true;
@@ -250,11 +221,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
_partitionFormat = null;
_partitionSize = -1;
}
-
- /**
- *
- * @return
- */
+
public boolean isPartitioned()
{
return _partitioned;
@@ -283,9 +250,9 @@ public class MatrixObject extends CacheableData<MatrixBlock>
* as we reject to partition vectors and support only full row or column indexing, no metadata (apart from
* the partition flag) is required.
*
- * @param pred
- * @return
- * @throws CacheException
+ * @param pred index range
+ * @return matrix block
+ * @throws CacheException if CacheException occurs
*/
public synchronized MatrixBlock readMatrixPartition( IndexRange pred )
throws CacheException
@@ -394,14 +361,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
return mb;
}
-
-
- /**
- *
- * @param pred
- * @return
- * @throws CacheException
- */
+
public String getPartitionFileName( IndexRange pred, int brlen, int bclen )
throws CacheException
{
@@ -485,13 +445,7 @@ public class MatrixObject extends CacheableData<MatrixBlock>
return newData;
}
-
- /**
- *
- * @param rdd
- * @return
- * @throws IOException
- */
+
@Override
protected MatrixBlock readBlobFromRDD(RDDObject rdd, MutableBoolean writeStatus)
throws IOException
@@ -557,9 +511,6 @@ public class MatrixObject extends CacheableData<MatrixBlock>
/**
* Writes in-memory matrix to HDFS in a specified format.
- *
- * @throws DMLRuntimeException
- * @throws IOException
*/
@Override
protected void writeBlobToHDFS(String fname, String ofmt, int rep, FileFormatProperties fprop)
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/PageCache.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/PageCache.java b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/PageCache.java
index f1462d4..7e96ec1 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/caching/PageCache.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/caching/PageCache.java
@@ -23,36 +23,22 @@ import java.lang.ref.SoftReference;
import java.util.HashMap;
import java.util.LinkedList;
-/**
- *
- *
- */
public class PageCache
{
private static final int CLEANUP_THRESHOLD = 128;
private static HashMap<Integer, LinkedList<SoftReference<byte[]>>> _pool;
-
- /**
- *
- */
+
public static void init()
{
_pool = new HashMap<Integer, LinkedList<SoftReference<byte[]>>>();
}
-
- /**
- *
- */
+
public static void clear()
{
_pool = null;
}
-
- /**
- *
- * @param data
- */
+
public static void putPage( byte[] data )
{
//cleanup if too many different size lists
@@ -66,12 +52,7 @@ public class PageCache
}
list.addLast(new SoftReference<byte[]>(data));
}
-
- /**
- *
- * @param size
- * @return
- */
+
public static byte[] getPage( int size )
{
LinkedList<SoftReference<byte[]>> list = _pool.get( size );
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContext.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContext.java b/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContext.java
index b6011ae..96147b9 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContext.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContext.java
@@ -19,7 +19,6 @@
package org.apache.sysml.runtime.controlprogram.context;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
@@ -32,7 +31,6 @@ import org.apache.sysml.parser.Expression.ValueType;
import org.apache.sysml.runtime.DMLRuntimeException;
import org.apache.sysml.runtime.controlprogram.LocalVariableMap;
import org.apache.sysml.runtime.controlprogram.Program;
-import org.apache.sysml.runtime.controlprogram.caching.CacheException;
import org.apache.sysml.runtime.controlprogram.caching.CacheableData;
import org.apache.sysml.runtime.controlprogram.caching.FrameObject;
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject;
@@ -187,13 +185,7 @@ public class ExecutionContext
return (FrameObject) dat;
}
-
- /**
- *
- * @param varname
- * @return
- * @throws DMLRuntimeException
- */
+
public CacheableData<?> getCacheableData(String varname)
throws DMLRuntimeException
{
@@ -207,12 +199,7 @@ public class ExecutionContext
return (CacheableData<?>) dat;
}
-
- /**
- *
- * @param varname
- * @throws DMLRuntimeException
- */
+
public void releaseCacheableData(String varname)
throws DMLRuntimeException
{
@@ -230,9 +217,9 @@ public class ExecutionContext
/**
* Pins a matrix variable into memory and returns the internal matrix block.
*
- * @param varName
- * @return
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @return matrix block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MatrixBlock getMatrixInput(String varName)
throws DMLRuntimeException
@@ -271,10 +258,11 @@ public class ExecutionContext
/**
* Allocates a sparse matrix in CSR format on the GPU.
* Assumes that mat.getNumRows() returns a valid number
- * @param varName
- * @param nnz number of non zeroes
- * @return
- * @throws DMLRuntimeException
+ *
+ * @param varName variable name
+ * @param nnz number of non zeroes
+ * @return matrix object
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MatrixObject getSparseMatrixOutputForGPUInstruction(String varName, long nnz)
throws DMLRuntimeException
@@ -287,9 +275,9 @@ public class ExecutionContext
/**
* Allocates the {@link GPUObject} for a given LOPS Variable (eg. _mVar3)
- * @param varName
- * @return
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @return matrix object
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public MatrixObject allocateGPUMatrixObject(String varName) throws DMLRuntimeException {
MatrixObject mo = getMatrixObject(varName);
@@ -321,8 +309,8 @@ public class ExecutionContext
/**
* Unpins a currently pinned matrix variable.
*
- * @param varName
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void releaseMatrixInput(String varName)
throws DMLRuntimeException
@@ -341,9 +329,9 @@ public class ExecutionContext
/**
* Pins a frame variable into memory and returns the internal frame block.
*
- * @param varName
- * @return
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @return frame block
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public FrameBlock getFrameInput(String varName)
throws DMLRuntimeException
@@ -355,8 +343,8 @@ public class ExecutionContext
/**
* Unpins a currently pinned frame variable.
*
- * @param varName
- * @throws DMLRuntimeException
+ * @param varName variable name
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
public void releaseFrameInput(String varName)
throws DMLRuntimeException
@@ -411,13 +399,7 @@ public class ExecutionContext
}
mo.getGPUObject().releaseOutput();
}
-
- /**
- *
- * @param varName
- * @param outputData
- * @throws DMLRuntimeException
- */
+
public void setMatrixOutput(String varName, MatrixBlock outputData)
throws DMLRuntimeException
{
@@ -426,14 +408,7 @@ public class ExecutionContext
mo.release();
setVariable(varName, mo);
}
-
- /**
- *
- * @param varName
- * @param outputData
- * @param inplace
- * @throws DMLRuntimeException
- */
+
public void setMatrixOutput(String varName, MatrixBlock outputData, UpdateType flag)
throws DMLRuntimeException
{
@@ -446,13 +421,7 @@ public class ExecutionContext
//default case
setMatrixOutput(varName, outputData);
}
-
- /**
- *
- * @param varName
- * @param outputData
- * @throws DMLRuntimeException
- */
+
public void setFrameOutput(String varName, FrameBlock outputData)
throws DMLRuntimeException
{
@@ -475,6 +444,9 @@ public class ExecutionContext
* parfor shared inputs that are passed to functions.
*
* The function returns the OLD "clean up" state of matrix objects.
+ *
+ * @param varList variable list
+ * @return map of old cleanup state of matrix objects
*/
public HashMap<String,Boolean> pinVariables(ArrayList<String> varList)
{
@@ -519,7 +491,10 @@ public class ExecutionContext
* unpinVariables(varList, oldStatus);
* </code>
*
- * i.e., a call to unpinVariables() is preceded by pinVariables().
+ * i.e., a call to unpinVariables() is preceded by pinVariables().
+ *
+ * @param varList variable list
+ * @param varsState variable state
*/
public void unpinVariables(ArrayList<String> varList, HashMap<String,Boolean> varsState)
{
@@ -535,7 +510,7 @@ public class ExecutionContext
/**
* NOTE: No order guaranteed, so keep same list for pin and unpin.
*
- * @return
+ * @return variable list as strings
*/
public ArrayList<String> getVarList()
{
@@ -544,13 +519,6 @@ public class ExecutionContext
return varlist;
}
-
- /**
- *
- * @param mo
- * @throws CacheException
- * @throws IOException
- */
public void cleanupMatrixObject(MatrixObject mo)
throws DMLRuntimeException
{
@@ -592,24 +560,14 @@ public class ExecutionContext
_dbState.prevPC = new DMLProgramCounter(DMLProgram.DEFAULT_NAMESPACE, "main", 0, 0); //initialize previous pc
}
}
-
- /**
- *
- * @param index
- * @throws DMLRuntimeException
- */
+
public void updateDebugState( int index ) throws DMLRuntimeException
{
if(DMLScript.ENABLE_DEBUG_MODE) {
_dbState.getPC().setProgramBlockNumber(index);
}
}
-
- /**
- *
- * @param currInst
- * @throws DMLRuntimeException
- */
+
public void updateDebugState( Instruction currInst ) throws DMLRuntimeException
{
if (DMLScript.ENABLE_DEBUG_MODE) {
@@ -624,10 +582,7 @@ public class ExecutionContext
suspendIfAskedInDebugMode(currInst);
}
}
-
- /**
- *
- */
+
public void clearDebugProgramCounters()
{
if(DMLScript.ENABLE_DEBUG_MODE) {
@@ -666,9 +621,9 @@ public class ExecutionContext
* In this function, if the user has issued one of the step instructions or
* has enabled suspend flag in previous instruction (through breakpoint),
* then it will wait until user issues a new debugger command.
- * @param currInst
- * @param ec
- * @throws DMLRuntimeException
+ *
+ * @param currInst current instruction
+ * @throws DMLRuntimeException if DMLRuntimeException occurs
*/
@SuppressWarnings("deprecation")
private void suspendIfAskedInDebugMode(Instruction currInst ) throws DMLRuntimeException {
http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/56e45f1a/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContextFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContextFactory.java b/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContextFactory.java
index f4cf424..4b2d9d0 100644
--- a/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContextFactory.java
+++ b/src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContextFactory.java
@@ -24,11 +24,6 @@ import org.apache.sysml.runtime.controlprogram.Program;
public class ExecutionContextFactory
{
-
- /**
- *
- * @return
- */
public static ExecutionContext createContext()
{
return createContext( null );
@@ -38,12 +33,7 @@ public class ExecutionContextFactory
{
return createContext(true, prog);
}
-
- /**
- *
- * @param platform
- * @return
- */
+
public static ExecutionContext createContext( boolean allocateVars, Program prog )
{
ExecutionContext ec = null;