Class template flat_map

| Home | Libraries | People | FAQ | More

## Class template flat_map

boost::compute::flat_map

## Synopsis

    // In header: <boost/compute/container/flat_map.hpp>

    template<typename Key, typename T>
    class flat_map {
    public:
      // types
      typedef Key                                             key_type;
      typedef T                                               mapped_type;
      typedef ::boost::compute::vector< std::pair< Key, T > > vector_type;
      typedef vector_type::value_type                         value_type;
      typedef vector_type::size_type                          size_type;
      typedef vector_type::difference_type                    difference_type;
      typedef vector_type::reference                          reference;
      typedef vector_type::const_reference                    const_reference;
      typedef vector_type::pointer                            pointer;
      typedef vector_type::const_pointer                      const_pointer;
      typedef vector_type::iterator                           iterator;
      typedef vector_type::const_iterator                     const_iterator;
      typedef vector_type::reverse_iterator                   reverse_iterator;
      typedef vector_type::const_reverse_iterator             const_reverse_iterator;

      // construct/copy/destruct
      explicit flat_map(const context & = system::default_context());
      flat_map(const flat_map< Key, T > &);
      flat_map< Key, T > & operator=(const flat_map< Key, T > &);
      ~flat_map();

      // public member functions
      iterator begin();
      const_iterator begin() const;
      const_iterator cbegin() const;
      iterator end();
      const_iterator end() const;
      const_iterator cend() const;
      reverse_iterator rbegin();
      const_reverse_iterator rbegin() const;
      const_reverse_iterator crbegin() const;
      reverse_iterator rend();
      const_reverse_iterator rend() const;
      const_reverse_iterator crend() const;
      size_type size() const;
      size_type max_size() const;
      bool empty() const;
      size_type capacity() const;
      void reserve(size_type, command_queue &);
      void reserve(size_type);
      void shrink_to_fit();
      void clear();
      std::pair< iterator, bool > insert(const value_type &, command_queue &);
      std::pair< iterator, bool > insert(const value_type &);
      iterator erase(const const_iterator &, command_queue &);
      iterator erase(const const_iterator &);
      iterator erase(const const_iterator &, const const_iterator &,
                     command_queue &);
      iterator erase(const const_iterator &, const const_iterator &);
      size_type erase(const key_type &, command_queue &);
      iterator find(const key_type &, command_queue &);
      iterator find(const key_type &);
      const_iterator find(const key_type &, command_queue &) const;
      const_iterator find(const key_type &) const;
      size_type count(const key_type &, command_queue &) const;
      size_type count(const key_type &) const;
      iterator lower_bound(const key_type &, command_queue &);
      iterator lower_bound(const key_type &);
      const_iterator lower_bound(const key_type &, command_queue &) const;
      const_iterator lower_bound(const key_type &) const;
      iterator upper_bound(const key_type &, command_queue &);
      iterator upper_bound(const key_type &);
      const_iterator upper_bound(const key_type &, command_queue &) const;
      const_iterator upper_bound(const key_type &) const;
      const mapped_type at(const key_type &) const;
      unspecified operator[](const key_type &);
    };

## Description

### `flat_map` public construct/copy/destruct

1.     explicit flat_map(const context & context = system::default_context());

2.     flat_map(const flat_map< Key, T > & other);

3.     flat_map< Key, T > & operator=(const flat_map< Key, T > & other);

4.     ~flat_map();

### `flat_map` public member functions

1.     iterator begin();

2.     const_iterator begin() const;

3.     const_iterator cbegin() const;

4.     iterator end();

5.     const_iterator end() const;

6.     const_iterator cend() const;

7.     reverse_iterator rbegin();

8.     const_reverse_iterator rbegin() const;

9.     const_reverse_iterator crbegin() const;

10.     reverse_iterator rend();

11.     const_reverse_iterator rend() const;

12.     const_reverse_iterator crend() const;

13.     size_type size() const;

14.     size_type max_size() const;

15.     bool empty() const;

16.     size_type capacity() const;

17.     void reserve(size_type size, command_queue & queue);

18.     void reserve(size_type size);

19.     void shrink_to_fit();

20.     void clear();

21.     std::pair< iterator, bool >
        insert(const value_type & value, command_queue & queue);

22.     std::pair< iterator, bool > insert(const value_type & value);

23.     iterator erase(const const_iterator & position, command_queue & queue);

24.     iterator erase(const const_iterator & position);

25.     iterator erase(const const_iterator & first, const const_iterator & last,
                       command_queue & queue);

26.     iterator erase(const const_iterator & first, const const_iterator & last);

27.     size_type erase(const key_type & value, command_queue & queue);

28.     iterator find(const key_type & value, command_queue & queue);

29.     iterator find(const key_type & value);

30.     const_iterator find(const key_type & value, command_queue & queue) const;

31.     const_iterator find(const key_type & value) const;

32.     size_type count(const key_type & value, command_queue & queue) const;

33.     size_type count(const key_type & value) const;

34.     iterator lower_bound(const key_type & value, command_queue & queue);

35.     iterator lower_bound(const key_type & value);

36.     const_iterator
        lower_bound(const key_type & value, command_queue & queue) const;

37.     const_iterator lower_bound(const key_type & value) const;

38.     iterator upper_bound(const key_type & value, command_queue & queue);

39.     iterator upper_bound(const key_type & value);

40.     const_iterator
        upper_bound(const key_type & value, command_queue & queue) const;

41.     const_iterator upper_bound(const key_type & value) const;

42.     const mapped_type at(const key_type & key) const;

43.     unspecified operator[](const key_type & key);