Question: 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, ...

```

UPDATE:
The C functions expect a continuous chunk of data, that starts at void \*sendbuf. The question here if these two calls are correct in this regard. Does &my\_boost\_array\_variable\_1[2] point to the same location as my\_boost\_array\_variable\_1.c\_array() + 2 ? Are these calls equivalent?

Answer: 
For me first is more clear then second. But in reality i think they are equal.
It is system-depended which one is faster, you can see the assembly code for your self.

First method is safer, since it will throw you exception if you will try to address not legal index.

Second method usually is faster, since you have only a single de-reference.