COMBINATORIAL_BLAS 1.6
 
Loading...
Searching...
No Matches
PruneColumn.cpp
Go to the documentation of this file.
1#include <mpi.h>
2#include <iostream>
3#include <vector>
4#include <algorithm>
5#include "CombBLAS/CombBLAS.h"
6
7using namespace combblas;
8
9int main(int argc, char *argv[])
10{
11 int myrank, nprocs;
12 MPI_Init(&argc, &argv);
15
16 {
17 std::shared_ptr<CommGrid> fullWorld;
18 fullWorld.reset(new CommGrid(MPI_COMM_WORLD, 0, 0));
19
21
22 ri.SetElement(0, 1); ri.SetElement(1, 5); ri.SetElement(2, 9); ri.SetElement(3, 6); ri.SetElement(4, 10);
23 ci.SetElement(0, 1); ci.SetElement(1, 2); ci.SetElement(2, 2); ci.SetElement(3, 4); ci.SetElement(4, 4);
24
26 A.ParallelWriteMM("A.mm", false);
27
28 FullyDistSpVec<int, int> ciprune(A.getcommgrid(), 5);
29 ciprune.SetElement(2, 2); ciprune.SetElement(3, 0); ciprune.SetElement(4, 2);
30 ciprune.DebugPrint();
31
32 A.PruneColumnByIndex(ciprune);
33
34 A.ParallelWriteMM("B.mm", false);
35 }
36
37
39 return 0;
40}
int main()
Definition Driver.cpp:12
int nprocs
Definition comms.cpp:55
double A