34 #include <cugar/basic/types.h> 88 template <
typename Key,
typename Container,
typename Compare>
91 typedef Key value_type;
92 typedef Container container_type;
93 typedef typename container_type::const_iterator const_iterator;
94 typedef const_iterator iterator;
98 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
priority_queue(Container cont = Container(),
const Compare cmp = Compare());
102 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
bool empty()
const;
106 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32
size()
const;
110 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
void push(
const Key key);
114 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
void pop();
118 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Key&
top();
122 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Key
top()
const;
126 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
const Key&
operator[] (
const uint32 i)
const;
130 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
void clear();
134 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
135 const_iterator
begin()
const {
return m_queue.size() ? m_queue.begin() + 1u : m_queue.end(); }
139 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
140 iterator
begin() {
return m_queue.size() ? m_queue.begin() + 1u : m_queue.end(); }
144 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
145 const_iterator
end()
const {
return m_queue.end(); }
149 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE
150 iterator
end() {
return m_queue.end(); }
155 CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator
upper_bound(
const Key& x);
167 #include <cugar/basic/priority_queue_inline.h> CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator end()
Definition: priority_queue.h:150
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator begin() const
Definition: priority_queue.h:135
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE uint32 size() const
Definition: priority_queue_inline.h:51
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE Key & top()
Definition: priority_queue_inline.h:106
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const Key & operator[](const uint32 i) const
Definition: priority_queue_inline.h:122
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE priority_queue(Container cont=Container(), const Compare cmp=Compare())
Definition: priority_queue_inline.h:33
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void push(const Key key)
Definition: priority_queue_inline.h:59
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE const_iterator end() const
Definition: priority_queue.h:145
Definition: priority_queue.h:89
Define a vector_view POD type and plain_view() for std::vector.
Definition: diff.h:38
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator begin()
Definition: priority_queue.h:140
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE iterator upper_bound(const Key &x)
Definition: priority_queue_inline.h:141
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE bool empty() const
Definition: priority_queue_inline.h:43
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void clear()
Definition: priority_queue_inline.h:130
CUGAR_FORCEINLINE CUGAR_HOST_DEVICE void pop()
Definition: priority_queue_inline.h:81