Distributed vector

This pull request adds a first implementation of a distributed vector (`hpx::vector`). This is a segmented array, where the segments can live on different localities. It exposes a segmented iterator which is modelled after Matt Austern's classical paper (http://lafstern.org/matt/segmented.pdf). This pull request also adds integration of this data structure with `hpx::parallel::for_each`.

I would like to ask to merge this into the master branch so others can start using it. I believe `hpx::vector` will add a valuable higher level abstraction to HPX, but it definitely needs some iterations in terms of the exposed interface and implemented functionality.

Several people have contributed: @sharmaar12 who worked in the context of GSoC 2014 and @gbibek who added distribution policy in the context of his masters thesis.
In my experience, one rarely access single elements from vectors, and if
so, then mostly for debugging. I would thus not mind if those remained
synchronous. What needs to be asynchronous are operations that act on many
vector elements.

-erik

On Mon, Oct 27, 2014 at 9:34 AM, Hartmut Kaiser <notifications@github.com>
wrote:

> In hpx/components/vector/partition_vector_component.hpp:
>
> > +        future<void> set_value_async(std::size_t pos, T_ && val)
> > +        {
> > +            HPX_ASSERT(this->get_gid());
> > +            return hpx::async<server_type::set_value_action>(
> > +                this->get_gid(), pos, std::forward<T_>(val));
> > +        }
> > +
> > +//         void clear()
> > +//         {
> > +//             HPX_ASSERT(this->get_gid());
> > +//             this->base_type::clear_async(this->get_gid()).get();
> > +//         }
> > +    };
> > +}
> > +
> > +#endif
>
> Doh! get_value/set_value are not part of the interface for std::vector. I
> guess it's fine for those to default to the async version. However this
> certainly raises the question of consistency. Should those function which
> are inherited from std::vector be async by default as well?
>
> --
> Reply to this email directly or view it on GitHub
> <https://github.com/STEllAR-GROUP/hpx/pull/1298/files#r19404280>.
>



-- 
Erik Schnetter <schnetter@cct.lsu.edu>
http://www.perimeterinstitute.ca/personal/eschnetter/