7 #include "../FullyDistSpVec.h" 8 #include "../FullyDistVec.h" 14 struct IsOdd :
public unary_function<T,bool> {
15 bool operator() (T number) {
return (number%2==1);}
18 int main(
int argc,
char* argv[])
21 MPI_Init(&argc, &argv);
22 MPI_Comm_size(MPI_COMM_WORLD,&nprocs);
23 MPI_Comm_rank(MPI_COMM_WORLD,&myrank);
31 SpParHelper::Print(
"Printing SPV_A\n");
38 SpParHelper::Print(
"Printing SPV_B\n");
43 SpParHelper::Print(
"Printing FPV\n");
47 SpParHelper::Print(
"Printing FPSV\n");
56 SpParHelper::Print(
"Printing SPV_C\n");
65 SpParHelper::Print(
"Printing SPV_D\n");
71 SpParHelper::Print(
"Printing SPV_C + SPV_D\n");
74 SpParHelper::Print(
"Printing SPV_D + SPV_D\n");
82 SpParHelper::Print(
"Printing SPV_E\n");
87 SpParHelper::Print(
"Printing SPV_F = SPV_C(SPV_E)\n");
94 if(val == SPV_J.NOT_FOUND)
108 if(val == SPV_J.NOT_FOUND)
123 cout << e.what() << endl;
void SetElement(IT indx, NT numx)
Indexing is performed 0-based.
FullyDistSpVec< IT, NT > Find(_Predicate pred) const
Return the elements for which pred is true.
void iota(IT globalsize, NT first)
int main(int argc, char *argv[])