Skip to content

Commit

Permalink
[MINOR] minor cleanups and optimizations to CLA MM primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
Baunsgaard committed Feb 3, 2025
1 parent 6a4b3d8 commit 24e6da7
Showing 1 changed file with 0 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,28 +195,7 @@ private static CompressedMatrixBlock RMMOverlapping(CompressedMatrixBlock m1, Ma
}

private static void addConstant(MatrixBlock constantRow, List<AColGroup> out) {
// it is fairly safe to add the constant row to a column group.
// but it is not necessary the fastest.

// final int nCol = constantRow.getNumColumns();
// int bestCandidate = -1;
// int bestCandidateValuesSize = Integer.MAX_VALUE;
// for(int i = 0; i < out.size(); i++) {
// AColGroup g = out.get(i);
// if(g instanceof ColGroupDDC && g.getNumCols() == nCol && g.getNumValues() < bestCandidateValuesSize)
// bestCandidate = i;
// }

constantRow.sparseToDense();

// if(bestCandidate != -1) {
// AColGroup bc = out.get(bestCandidate);
// out.remove(bestCandidate);
// AColGroup ng = bc.binaryRowOpRight(new BinaryOperator(Plus.getPlusFnObject(), 1),
// constantRow.getDenseBlockValues(), true);
// out.add(ng);
// }
// else
out.add(ColGroupConst.create(constantRow.getDenseBlockValues()));
}

Expand Down

0 comments on commit 24e6da7

Please sign in to comment.