#include <iostream>
#include <cstdlib>
#include <ctime>
#include "cppscalapack.h"
#include "cppscalapack_init.h"
using namespace std;
int main(int argc, char** argv)
{
srand(time(NULL));
const int L(4);
CPPSL::initialize(argc,argv, 2,4, 64,64);
CPPSL::dcovector x(L);
for(int i=0; i<x.l; i++){
x(i) = double(rand()/(RAND_MAX/10));
}
CPPSL::cout << "x =\n" << x << endl;
for(int i=0; i<x.l; i++){
CPPSL::cout << "x(" << i << ") =" << x(i) << endl;
}
CPPSL::dcovector y(x);
CPPSL::cout << "y =\n" << y << endl;
for(int i=0; i<y.l; i++){
CPPSL::cout << "y(" << i << ") =" << y(i) << endl;
}
CPPSL::cout << "x+y=\n" << x+y << endl;
CPPSL::finalize();
return 0;
}