12#include "detray/definitions/algorithms.hpp"
13#include "detray/definitions/detail/qualifiers.hpp"
14#include "detray/definitions/indexing.hpp"
15#include "detray/utils/invalid_values.hpp"
26template <
bool kSORT = false>
32 template <
typename bin_t,
typename content_t>
33 DETRAY_HOST_DEVICE
void operator()(bin_t &&bin, content_t &&entry)
const {
34 std::forward<bin_t>(bin).init(std::forward<content_t>(entry));
37 if constexpr (kSORT) {
39 std::forward<bin_t>(bin).end());
47template <
bool kSORT = false>
53 template <
typename bin_t,
typename entry_t>
54 DETRAY_HOST_DEVICE
void operator()(bin_t &&bin, entry_t &&entry)
const {
55 std::forward<bin_t>(bin).push_back(std::forward<entry_t>(entry));
58 if constexpr (kSORT) {
60 std::forward<bin_t>(bin).end());
69template <
bool kSORT = false>
75 template <
typename bin_t,
typename entry_t>
76 DETRAY_HOST_DEVICE
void operator()(bin_t &&bin, entry_t &&entry)
const {
77 for (
dindex i{std::forward<bin_t>(bin).size()};
78 i < std::forward<bin_t>(bin).capacity(); ++i) {
79 std::forward<bin_t>(bin).push_back(std::forward<entry_t>(entry));
83 if constexpr (kSORT) {
85 std::forward<bin_t>(bin).end());
Detray include(s).
Definition array_operators.hpp:18
unsigned int dindex
Default index type.
Definition indexing.hpp:18
void sequential_sort(rand_iter_t first, sentinel_t last)
sequential (single thread) sort function
Definition algorithms.hpp:29
An attach populator that adds a new entry to a given bin.
Definition populators.hpp:48
void operator()(bin_t &&bin, entry_t &&entry) const
Append a new entry to the bin - forwarding.
Definition populators.hpp:54
A complete populator that adds entries to a bin which contains an array of entries until it is comple...
Definition populators.hpp:70
void operator()(bin_t &&bin, entry_t &&entry) const
Complete the bin content with a new entry - forwarding.
Definition populators.hpp:76
A replace populator that overrides whatever current content is in the bin with a new entry.
Definition populators.hpp:27
void operator()(bin_t &&bin, content_t &&entry) const
Replace the bin content with a new entry - forwarding.
Definition populators.hpp:33