33 using key_type = int32_t;
34 using mapped_type = int32_t;
35 using value_type = std::pair<key_type, mapped_type>;
36 using size_type = std::size_t;
37 using iterator = mapped_type*;
38 using const_iterator =
const mapped_type*;
59 template <concepts::queue TQueue>
86 const_iterator
end()
const;
89 const_iterator
cend()
const;
94 iterator find(key_type key);
95 const_iterator find(key_type key)
const;
101 size_type
count(key_type key)
const;
140 std::pair<const_iterator, const_iterator>
equal_range(key_type key)
const;
143 device_buffer<TDev, mapped_type[]> m_indexes;
144 device_buffer<TDev, key_type[]> m_offsets;
145 host_buffer<AssociationMapView> m_hview;
146 device_buffer<TDev, AssociationMapView> m_view;
149 template <concepts::queue TQueue>
150 ALPAKA_FN_HOST
void initialize(size_type nelements, size_type nbins, TQueue& queue);
152 template <concepts::queue TQueue>
153 ALPAKA_FN_HOST
void reset(TQueue& queue, size_type nelements, size_type nbins);
155 template <concepts::accelerator TAcc,
typename TFunc, concepts::queue TQueue>
156 ALPAKA_FN_HOST
void fill(size_type
size, TFunc func, TQueue& queue);
158 template <concepts::accelerator TAcc, concepts::queue TQueue>
159 ALPAKA_FN_HOST
void fill(size_type
size, std::span<key_type> associations, TQueue& queue);
161 AssociationMapView* view();
163 ALPAKA_FN_HOST
const auto& indexes()
const;
164 ALPAKA_FN_HOST
auto& indexes();
166 ALPAKA_FN_ACC Span<int32_t> indexes(size_type bin_id);
167 ALPAKA_FN_HOST device_view<TDev, int32_t[]> indexes(
const TDev& dev, size_type bin_id);
168 ALPAKA_FN_ACC Span<int32_t> operator[](size_type bin_id);
170 ALPAKA_FN_HOST
const device_buffer<TDev, int32_t[]>& offsets()
const;
171 ALPAKA_FN_HOST device_buffer<TDev, int32_t[]>& offsets();
173 ALPAKA_FN_ACC int32_t offsets(size_type bin_id)
const;
175 template <concepts::device _TDev>
176 friend class Followers;
178 template <u
int8_t Ndim, concepts::device _TDev>
179 friend class TilesAlpaka;
181 template <concepts::queue _TQueue>
182 friend auto clue::test::build_map(_TQueue&, std::span<key_type>, int32_t);