S
Scott Kilpatrick
I have read some posts mentioning reading from a STL vector's buffer by
using &vec.front(), but I haven't seen anything regarding writing to
the vector using its buffer. I am using MPI to send some vectors
around; is it ok to receive data using a vector's buffer? e.g.:
vector<int> src(75);
MPI_Send(&src.front(), 75, ...)
-----------------------
vector<int> dest(100);
MPI_Recv(&dest.front(), 100, ...);
Presumably, this would send all 75 ints in src to the first 75
locations in dest. Or would it?
Scott
using &vec.front(), but I haven't seen anything regarding writing to
the vector using its buffer. I am using MPI to send some vectors
around; is it ok to receive data using a vector's buffer? e.g.:
vector<int> src(75);
MPI_Send(&src.front(), 75, ...)
-----------------------
vector<int> dest(100);
MPI_Recv(&dest.front(), 100, ...);
Presumably, this would send all 75 ints in src to the first 75
locations in dest. Or would it?
Scott