Skip to content

Commit e1c7faa

Browse files
committed
minor aesthetic/comment changes
1 parent 536a699 commit e1c7faa

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

ReleaseTests/PruneColumn.cpp

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,12 @@ int main(int argc, char *argv[])
2626
A.ParallelWriteMM("A.mm", false);
2727

2828
FullyDistSpVec<int, int> ciprune(A.getcommgrid(), 5);
29-
ciprune.SetElement(2, 0);// ciprune.SetElement(2, 2); ciprune.SetElement(3, 0); ciprune.SetElement(4, 2);
29+
ciprune.SetElement(2, 2); ciprune.SetElement(3, 0); ciprune.SetElement(4, 2);
3030
ciprune.DebugPrint();
3131

3232
A.PruneColumnByIndex(ciprune);
3333

3434
A.ParallelWriteMM("B.mm", false);
35-
36-
/* SpParMat<int, int, SpDCCols<int, int>> A(fullWorld); */
37-
/* A.ParallelReadMM("A.mtx", false, maximum<int>()); */
38-
39-
/* FullyDistSpVec<int, int> ci(A.getcommgrid(), A.getncol()); */
40-
/* for (int i = 1; i < A.getncol(); i += 2) */
41-
/* ci.SetElement(i, 1); */
42-
/* ci.DebugPrint(); */
43-
44-
/* A.PruneColumnByIndex(ci); */
45-
/* A.ParallelWriteMM("A.mm", false); */
46-
4735
}
4836

4937

include/CombBLAS/dcsc.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,8 @@ Dcsc<IT,NT>* Dcsc<IT,NT>::PruneColumn(NT* pvals, _BinaryOperation __binary_op, b
779779
template <class IT, class NT>
780780
void Dcsc<IT,NT>::PruneColumnByIndex(const std::vector<IT>& ci)
781781
{
782-
if (ci.size() == 0) return;
782+
if (ci.size() == 0)
783+
return;
783784

784785
/* ci is assumed to be pre-sorted */
785786

@@ -791,7 +792,7 @@ void Dcsc<IT,NT>::PruneColumnByIndex(const std::vector<IT>& ci)
791792

792793
while (j < nzc)
793794
{
794-
if (c >= ci.size() || ci[c] > jc[j]) /* this means column j shouldn't be pruned, and instead should be copied */
795+
if (c >= ci.size() || ci[c] > jc[j]) /* this means column jc[j] shouldn't be pruned, and instead should be copied */
795796
{
796797
vjc.push_back(jc[j]);
797798
nzpercol.push_back(cp[j+1] - cp[j]);
@@ -830,13 +831,6 @@ void Dcsc<IT,NT>::PruneColumnByIndex(const std::vector<IT>& ci)
830831
std::copy(vjc.begin(), vjc.end(), jc);
831832
std::copy(vir.begin(), vir.end(), ir);
832833
std::copy(vnumx.begin(), vnumx.end(), numx);
833-
834-
// std::copy(jc, jc + nzc, std::ostream_iterator<IT>(std::cout, " "));
835-
// std::cout << std::endl;
836-
// std::copy(cp, cp + nzc + 1, std::ostream_iterator<IT>(std::cout, " "));
837-
// std::cout << std::endl;
838-
// std::copy(ir, ir + nz, std::ostream_iterator<IT>(std::cout, " "));
839-
// std::cout << std::endl;
840834
}
841835

842836

0 commit comments

Comments
 (0)