Association map¶
-
template<concepts::device TDev = clue::Device>
class AssociationMap¶ The AssociationMap class is a data structure that maps keys to values. It associates integer keys with integer values in ono-to-many or many-to-many associations.
- Template Parameters:¶
Public Types¶
-
using key_type = int32_t¶
-
using mapped_type = int32_t¶
-
using value_type = std::pair<key_type, mapped_type>¶
-
using size_type = std::size_t¶
-
using iterator = mapped_type*¶
-
using const_iterator = const mapped_type*¶
-
using mapped_container_type = device_buffer<TDev, mapped_type[]>¶
Public Functions¶
-
AssociationMap() = default¶
Construct an empty AssociationMap.
-
AssociationMap(size_type nelements, size_type nbins)¶
Construct an AssociationMap with a specific number of elements and bins.
Note
This constructor is only available for the CPU device
-
AssociationMap(size_type nelements, size_type nbins, const TDev &dev)¶
Construct an AssociationMap with a specific number of elements and bins.
-
template<concepts::queue TQueue>
AssociationMap(size_type nelements, size_type nbins, TQueue &queue)¶ Construct an AssociationMap with a specific number of elements and bins.
-
auto extents() const¶
Return the extents of the internal buffers.
- Returns:¶
A struct containing the number of keys and values in the map
-
iterator begin()¶
Return iterator to the beginning of the content buffer.
- Returns:¶
An iterator to the beginning of the content buffer
-
const_iterator begin() const¶
Return const iterator to the beginning of the content buffer.
- Returns:¶
A const iterator to the beginning of the content buffer
-
const_iterator cbegin() const¶
Return const iterator to the beginning of the content buffer.
- Returns:¶
A const iterator to the beginning of the content buffer
-
iterator end()¶
Return iterator to the end of the content buffer.
- Returns:¶
An iterator to the end of the content buffer
-
const_iterator end() const¶
Return const iterator to the end of the content buffer.
- Returns:¶
A const iterator to the end of the content buffer
-
const_iterator cend() const¶
Return const iterator to the end of the content buffer.
- Returns:¶
A const iterator to the end of the content buffer
-
const_iterator find(key_type key) const¶
-
const_iterator lower_bound(key_type key) const¶
Get the const iterator to the first element with a given key.
-
iterator upper_bound(key_type key)¶
Get the iterator to the first element with a key greater than the given key.
-
const_iterator upper_bound(key_type key) const¶
Get the const iterator to the first element with a key greater than the given key.
-
std::pair<iterator, iterator> equal_range(key_type key)¶
Get the range of elements with a given key.
-
std::pair<const_iterator, const_iterator> equal_range(key_type key) const¶
Get the const range of elements with a given key.
-
Containers extract() const¶
Get a const-reference to the underlying containers.
- Returns:¶
A Containers object
-
const AssociationMapView &view() const¶
Get the constant view of the association map.
- Returns:¶
A const reference to the AssociationMapView
-
AssociationMapView &view()¶
Get the view of the association map.
- Returns:¶
A reference to the AssociationMapView
Friends¶
- friend class internal::Tiles
-
struct Containers¶
-
struct Extents¶