
29 Nov
2012
29 Nov
'12
9:47 a.m.
Hi, I have a two variables: boost::array my_boost_array_variable_1<float, 3>; boost::array my_boost_array_variable_2<float, 3>; now I want to call a C function with the following signature: int MPI_Allreduce ( void *sendbuf, void *recvbuf, ...); I want to pass the address of a particular element of my my_boost_array_variable_1 and my_boost_array_variable_2 as a first and second parameter of MPI_Allreduce: MPI_Allreduce(&my_boost_array_variable_1[2], &my_boost_array_variable_2[2], ... or should I rather do: MPI_Allreduce(my_boost_array_variable_1.c_array() + 2, my_boost_array_variable_2.c_array() + 2, ... Thanks, Anton