3 #include "priority_queue/hdr_pqueue.h"
4 #include <cds/container/mspriority_queue.h>
6 namespace priority_queue {
8 template <typename T, typename Traits>
9 struct constants<cds::container::MSPriorityQueue<T, Traits> > {
10 static size_t const nCapacity = c_nCapacity - 1;
15 typedef cds::opt::v::dynamic_buffer< char > buffer_type;
18 void PQueueHdrTest::MSPQueue_dyn()
20 typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
21 cds::container::mspriority_queue::make_traits<
22 cds::opt::buffer< buffer_type >
26 test_msq_dyn<pqueue>();
29 void PQueueHdrTest::MSPQueue_dyn_cmp()
31 typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
32 cds::container::mspriority_queue::make_traits<
33 cds::opt::buffer< buffer_type >
34 ,cds::opt::compare< PQueueHdrTest::compare >
38 test_msq_dyn<pqueue>();
41 void PQueueHdrTest::MSPQueue_dyn_less()
43 typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
44 cds::container::mspriority_queue::make_traits<
45 cds::opt::buffer< buffer_type >
46 ,cds::opt::less< PQueueHdrTest::less >
50 test_msq_dyn<pqueue>();
53 void PQueueHdrTest::MSPQueue_dyn_cmpless()
55 struct pqueue_traits : public cds::container::mspriority_queue::traits
57 typedef buffer_type buffer;
58 typedef PQueueHdrTest::less less;
59 typedef PQueueHdrTest::compare compare;
61 typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type, pqueue_traits > pqueue;
63 test_msq_dyn<pqueue>();
66 void PQueueHdrTest::MSPQueue_dyn_cmp_mtx()
68 typedef cds::container::MSPriorityQueue< PQueueHdrTest::value_type,
69 cds::container::mspriority_queue::make_traits<
70 cds::opt::buffer< buffer_type >
71 ,cds::opt::compare< PQueueHdrTest::compare >
72 ,cds::opt::lock_type<std::mutex>
76 test_msq_dyn<pqueue>();
79 } // namespace priority_queue