-
- Downloads
There was an error fetching the commit references. Please try again later.
Improved Communicator class
Now all the MPI wrappers come in two flavors. They can be used with a pointer as usual, e.g. double*data; comm.Sum(&data[0],n); or they can be used with a reference to a single number double x; comm.Sum(x); // same as comm.Sum(&x,1); Notably, the second version also works with std::vector and std::string and automatically detect the size, e.g. std::vector<double> v; comm.Sum(v); // same as comm.Sum(&v[0],v.size()); Furthermore, everything works transparently with Vector and Tensor either as single objects or elements of vectors or of C arrays: std::vector<Vector> v; comm.Sum(v); // same as comm.Sum(&v[0],v.size()); // same as comm.Sum(&v[0][0],3*v.size()); All the regtests are satisfied
Loading
Please register or sign in to comment